Settings | Sign in | Sign up

There is currently 1 post.

关于rxdata文件的说明

Floor 1 巨大八爪鱼 7/18/24 17:31
rxdata文件里面的字符串,汉字都是utf-8编码,明文存储的,没有任何的加密措施!
那为什么用记事本打开一个rxdata文件会乱码呢?这是因为,utf-8编码的txt文本文件,文件开头一般会有3个字节的BOM头(EF BB BF)。没有这个BOM头,记事本就会以为这是一个gb2312编码的文本文件。rxdata文件里面的整型数据(int)也是明文存储的,是按整型格式,不是按字符串格式存储的。当utf-8字符串和这些整型数据混合在一起时,记事本就会以gb2312编码方式显示文本,肯定就会乱码了。utf-8编码的一个汉字占3个字节,记事本甚至都分不清到底哪一个字节是汉字的第一个字节!

Content converter:

Reply the post
Content:
User: You are currently anonymous.
Captcha:
Unclear? Try another one.
©2010-2025 Purasbar Ver3.0 [Mobile] [Desktop]
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported license.