问题描述
大家早上好。
我正在编写一个C ++应用程序,它尝试使用POP3协议从邮箱中获取一些信息。我想要获取的信息包含法语字符,意味着强调的字符,如é,ç,à。我需要将这些信息存储在MySQL数据库中。要在屏幕上或文件中显示这些信息,我会得到奇怪的字符而不是强调的字符。
一个例子:
而不是得到:
Super ULaFertéGaucher:Démarrage
我得到:
Super U La Fert =?iso-8859-1?B?6SBHYXVjaGVyIDogTlJ2aXNpb24gMjAxMy0xMSA6IETp?= marrage
我可以从生成的信息中读取我的角色在iso-8859-1中编码,但我需要UTF-8。
有没有办法解码这些信息,或者为了得到正确的结果可能需要进行一些配置。
我不想使用任何非标准库(仅限Microsoft工具)。
备注:我使用的是Visual Studio 2010,Windows 8.我的应用程序是两个版本控制台CLR和MFC。
提前谢谢
Good morning everyone.
I am writing a C++ application which tries to get some information from a mail box using POP3 protocol. The information I am trying to get contains French characters, means accentuated characters like "é, ç, à". I need to store this information in a MySQL database. To display this information on the screen or in a file I get strange characters instead of the accentuated ones.
an example :
instead of getting:
"Super U La Ferté Gaucher : Démarrage"
I get:
"Super U La Fert=?iso-8859-1?B?6SBHYXVjaGVyIDogTlJ2aXNpb24gMjAxMy0xMSA6IETp?=marrage"
I can read from the generated information that my characters are coded in iso-8859-1, but I need them in UTF-8.
Is there any way to decode this information, or maybe some configuration that should be done to get the right result.
I don't want to use any non-standard libraries (only Microsoft tools).
Remarks: I am using Visual Studio 2010, Windows 8. My application is in two versions Console CLR and MFC.
Thank you in advance
推荐答案
这篇关于从iso-8859-1转换为UTF-8的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!