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.
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.