如何将unicode转换为可读的字符串? [英] How do I convert unicode to readable string?

查看:69
本文介绍了如何将unicode转换为可读的字符串?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我编写了一个POP3类,该类可以访问我的电子邮件帐户并读取我的消息,但是消息的主体是unicode.如何将其解析/转换为可读的字符串?

预先感谢,
Donald

I''ve written a POP3 class that access my email account and reads my messages but the body of the message is in unicode. How do I parse/convert this into a readable string?

Thanks in advance,
Donald

推荐答案

不要读取字节,而是将其读取为字符串. .net字符串采用unicode.
Don''t read the bytes, read it as a string. .net Strings are in unicode.


Unicode始终可读,您只需要使用适当的控件即可读取Unicode.所有.NET和.NET控件均显示Unicode,并在内部使用其UTF-16编码.

参见:
http://msdn.microsoft.com/en-us/library/system.text. encoding.aspx [^ ],
http://unicode.org/ [ ^ ],
http://unicode.org/faq/utf_bom.html [
Unicode is always readable, you just need to use proper control to read Unicode. All the .NET and .NET controls do show Unicode and internally use its UTF-16 encoding.

See:
http://msdn.microsoft.com/en-us/library/system.text.encoding.aspx[^],
http://unicode.org/[^],
http://unicode.org/faq/utf_bom.html[^].

—SA


这篇关于如何将unicode转换为可读的字符串?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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