Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ASCII vs. UTF8 #18

Open
Sjonnie2nd opened this issue Sep 5, 2014 · 1 comment
Open

ASCII vs. UTF8 #18

Sjonnie2nd opened this issue Sep 5, 2014 · 1 comment

Comments

@Sjonnie2nd
Copy link

Hi Ditesh,

This does not look to be an issue of poplib persé, but maybe it wel help others.

Running poplib in node.js on Windows 7, i received some emails which were unreadable (even the headers).
More unluckely, in some cases the retr command got stuck (no retr event was fired).

After the retr command the log for example starts with: "+OK \u0000\u0000\u0000\u0000 oct\u0000". Sometimes ending with a "\r\n.\r\n", sometimes not.

But hey! Why did my old .NET C# POP3-client not have this issue. Looking at the source I saw that (by accident) every communication with the server was translated to UTF-8!

Cause of all this looks to be the Dovecot server of the provider which unattendedly sends UTF-8 formatted lines (but I'm not sure).
I've seen POP3 recently has a UTF-8 capability (RFC 6856), but on CAPA the server doesn't return UTF-8 as a capability.

My simple workarround:
Changed line 201 of main.js: data = data.toString("ascii");
into: data = data.toString("utf8");
Looks to work without problems.

Any thoughts?
Greetings.

@Rossonero
Copy link

i got the same problem as well and i did the same change to solve it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants