pouchdb-community / pouchdb-dump-cli

Command-line tool for dumping a CouchDB/PouchDB database to a file
Apache License 2.0
84 stars 20 forks source link

German Umlaute not correctly saved on windows 8.1 #8

Closed barbalex closed 9 years ago

barbalex commented 9 years ago

My data is German and contains lots of "Umlaute" (ä, Ä, ö, Ö, ü, Ü and more).

In the resulting file these are changed: for instance "ä" becomes "├ñ".

The resulting file seems to be encoded in UTF-16LE. As far as I can tell, this endoding CAN correctly deal with umlaute. I have no idea why it does not.

I am a bad noob, so if there is something I could have done wrong, I probably have. But I managed to dump the database (not that that was hard...) and I can't imagine what I could have done wrong when doing that.

Could it maybe have something to do with Byte Order? According to this article (https://en.wikipedia.org/wiki/UTF-16#Byte_order_encoding_schemes) windows (which I work on) could get that wrong if the file was saved as UTF-16LE but without BOM. No. After reading that again, LE stands for little endian which Windows uses.

Well, no idea why but it does't work for me.

Update: I tried on OsX and it worked, the Umlaute are correct. So it seems to happen only on Windows.

nolanlawson commented 9 years ago

Sorry, I don't have a Windows machine, so I'm not sure how to fix this. :/ I'd accept a pull request, though!

barbalex commented 9 years ago

o.k., done

nolanlawson commented 9 years ago

fixed in #9 and #10

nolanlawson commented 9 years ago

published in 2.0.2

barbalex commented 9 years ago

That was my first ever pull request. I'm getting a beer now :-) Am 25.07.2015 7:41 nachm. schrieb "Nolan Lawson" notifications@github.com:

published in 2.0.2

— Reply to this email directly or view it on GitHub https://github.com/nolanlawson/pouchdb-dump-cli/issues/8#issuecomment-124866623 .

nolanlawson commented 9 years ago

Nice!! Thanks a lot for your help. :)