从字节发现字符编码 [英] Discover the character encoding from byte

查看:169
本文介绍了从字节发现字符编码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个字符串,其中我知道度字符(°)由字节63(3F)表示。

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

每个字符由一个字节

如何找到所使用的字符编码?

How can I find the character encoding used ?

推荐答案

现代的几乎所有8位编码与ASCII范围内的ASCII一致,因此字节3F十六进制是问号?。正如Sebtm的评论所暗示的,这可能是由字符级数据错误引起的。例如,一些限于ASCII的软件可以将所有其他字节转换为? - 这不是一个好的做法,但是可能。

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.

如果是非ASCII字节,您可以使用 http://www.eki.ee/letter /chardata.cgi?search=degree+sign 进行猜测。

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.

这篇关于从字节发现字符编码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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