This project is read-only.

problem with MessageBody UTF-8

Apr 21, 2010 at 9:22 PM

Hello, your library is great and the best I found on the internet.

I found one problem with email sent from some internet client.

My email is "plain text" and it is in UTF-8. I'm Czech so I use diacritical letters. Subject of message is parsed well, but body not. Diacritical letters are replaced by '?'.

I found the problem is in module Pop3Client with code "Encoding.ASCII". I tried to replace it to "Encoding.UTF8" and body of my email was parsed well.

Could you try to fix this problem ?

Thanks a lot

Vaclav Macak

Czech Republic

Apr 24, 2010 at 12:47 PM

I'm planing to add ResponseEncode property to Pop3Client class.
I guess that solve your problem with modify line 289,317.
return Encoding.ASCII.GetString(ms.ToArray())// at line 289
bt = Encoding.ASCII.GetBytes(CurrentLine);// at line 317
return this.ResponseEncode.GetString(ms.ToArray());
bt = this.ResponseEncode.GetBytes(CurrentLine);
Is it OK??
It is not certain for me that would solve your problem.
Please tell me more detail about the way you fix your problem with line number.

Apr 26, 2010 at 10:48 PM

You ar right. I only replaced ASCII to UTF8. Your way with ReponseEncode is better.


My code

line 289 : return Encoding.UTF8.GetString(ms.ToArray());

line 317 : bt = Encoding.UTF8.GetBytes...

May 1, 2010 at 3:23 AM

I added ResponseEncoding property to Pop3Client class.
Check it out!