如何将unicode转换为可读的字符串?

编程入门 行业动态 更新时间:2024-10-25 12:25:57
本文介绍了如何将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

推荐答案

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

Unicode始终可读,您只需要使用适当的控件即可读取Unicode.所有.NET和.NET控件均显示Unicode,并在内部使用其UTF-16编码. 参见: msdn.microsoft/en-us/library/system.text. encoding.aspx [^ ], unicode/ [ ^ ], unicode/faq/utf_bom.html [ ^ ].
—SA
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: msdn.microsoft/en-us/library/system.text.encoding.aspx[^], unicode/[^], unicode/faq/utf_bom.html[^].
—SA

更多推荐

如何将unicode转换为可读的字符串?

本文发布于:2023-11-02 17:49:28,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1553024.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:转换为   字符串   如何将   可读   unicode

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!