Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在解析二进制文件中的值。我正在解析的一个值是一个 16 位数字,它表示 unicode 字符的 UCS-2 编码。我将它转换为这样的字符:
char c = (char)myInteger;
这安全吗?
是的,只要没有字节顺序问题,这应该没问题。