I use the imap
with nodejs and fetch some E-Mails. All works fine. The imap
is a low level lib and gives all the data without any encoding to my application.
The subject correctly is "GMX Täßt". I received this =?UTF-8?Q?GMX_T=C3=A4=C3=9Ft?=
from the lib. All fine at this time.
If I wanna convert it back to "GMX Täßt" (I have tried many things.." I got GMX T├ñ├ƒt withtout umlauts.
stringFromSubject = "=?UTF-8?Q?GMX_T=C3=A4=C3=9Ft?=";
decodeURIComponent(
stringFromSubject.replace(/=([0-9A-F]{2})/g, "%$1")
).replace(/_/g, " ");
Here is the link of the lib. Can anyone help to convert it back "correctly"?