在C#中的问题UTF8(引用Printable)转换 [英] UTF8 (Quoted Printable) conversion in C# question

查看:265
本文介绍了在C#中的问题UTF8(引用Printable)转换的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从邮箱拉动法国的电子邮件和电子邮件包含口音。我相信这是用UTF8编码。

I am pulling French emails from a mailbox and the emails contain accents. I believe it is using UTF8 encoding.

我都试过,我在互联网找到,但一直未果不同UTF8转换方法。

I have tried different UTF8 conversion methods I've found around the Internet but have been unsuccessful.

如何,例如,​​在C#中,我转换这一点:蒙特娄= C3 = A9al到蒙特利尔

How, for example, in C#, do I convert this: Montr=C3=A9al to Montréal?

编辑:?还有,它是不一致的。有时也可能是像蒙特娄&放大器; eacute;人。 (&符号后的空间只是添加,因此浏览器不进行转换。)

Also, it is inconsistent. Sometimes it may be like Montr& eacute;al. (The space after the ampersand is just added so the browser does not convert it.)

谢谢!
标记

Thanks!! Mark

推荐答案

这不是UTF-8。这是引用的可打印,这相当不一样的排序编码为UTF-8 - 它更是ASCII文本Unicode文本的编码。

That's not UTF-8. That's quoted printable, which quite isn't the same sort of encoding as UTF-8 - it's more an "ASCII text to Unicode text" encoding.

引用Printable将有效地让你的ASCII信息转换为字节数组,数组中的然后被解码为UTF-8。

Quoted printable will effectively allow you to convert the ASCII message into a byte array which can then be decoded as UTF-8.

我不知道是否有.NET中的引用可打印的编码,这是有点怪异的任何直接支持......我很可能错过了一些东西。

I'm not sure whether there's any direct support in .NET for quoted printable encoding, which is somewhat bizarre... I may well have missed something.

这篇关于在C#中的问题UTF8(引用Printable)转换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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