ashtuchkin / iconv-lite

Convert character encodings in pure javascript.
MIT License
3.07k stars 282 forks source link

utf-8 to windows-1252 #249

Closed alienbuild closed 4 years ago

alienbuild commented 4 years ago

I'm hoping someone here could help me. I have an issue where I'm trying to read a value of a widows-1252 character in javascript.

The character in question is: �

It should decode to read 'Å'.

I've tried a plethora of different ways to get this value but I can't seem to convert it correctly. My IDE however can convert it correctly and detects it as windows-1252.

In all honesty I'm a little lossed with this one, any advice or a point in the right direction would be greatly appreciated. I have a bunch of strings I need to convert from utf-8 to windows-1252.

Thanks,

alienbuild commented 4 years ago

Reading the file as latin1 seems to work fine for me. Closing this.