欧元符号 € 的十六进制表示 [英] Hex representation of Euro Symbol €

查看:54
本文介绍了欧元符号 € 的十六进制表示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 XVI32(十六进制编辑器)来获取欧元符号的十六进制表示,它给我的值为 80.
另一个站点:http://www.string-functions.com/string-hex.aspx 也一样.
我无法理解为什么十六进制表示是 80 而不是 0x20AC.这个 0X80 给出十进制的 128,如果我使用 Alt+0128 它实际上产生欧元符号.

I was using XVI32 (Hex Editor) to get the hex representation of the Euro symbol and it gives me the value as 80.
Another site: http://www.string-functions.com/string-hex.aspx does the same.
I am not able to understand why the hex representation is 80 instead of 0x20AC. This 0X80 gives 128 in decimal and if I use Alt+0128 it actually produces the Euro symbol.

有人能解释一下这种从字符串到十六进制转换背后的逻辑吗?

Could somebody throw some light on what could be the logic behind this conversion from string to hex conversion ?

谢谢

推荐答案

字符编码(或字符集)将字符映射到字节值序列.您的字符集是 windows-1252,它将欧元符号编码为单个十六进制字节0x80(十进制为 128,正如 Oded 所说).每个字符集对非 ASCII 字符的编码方式不同;0x80 从根本上来说没有什么对"或错".

A character encoding (or charset) maps characters to a sequence of byte values. Your charset is windows-1252, which encodes the euro symbol as the single hex byte 0x80 (which is 128 in decimal, as Oded says). Each charset encodes non-ASCII characters differenly; there's nothing fundamentally "right" or "wrong" about that 0x80.

这篇关于欧元符号 € 的十六进制表示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆