Discover the character encoding from byte

喜夏-厌秋 提交于 2019-12-24 10:27:58

问题


I have a string where I know that the degree symbol (°) is represented by the byte 63 (3F).

Each character is represented by a single byte.

How can I find the character encoding used ?


回答1:


Almost all 8-bit encodings in modern times coincide with ASCII in the ASCII range, so byte 3F hexadecimal is the question mark “?”. As Sebtm’s comment suggests, this might result from character-level data error. E.g., some software that is limited to ASCII could turn all other bytes to “?” – not a good practice, but possible.

If it were a non-ASCII byte, you could use the page http://www.eki.ee/letter/chardata.cgi?search=degree+sign to make a guess.



来源:https://stackoverflow.com/questions/9617445/discover-the-character-encoding-from-byte

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!