-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The fault was Node the entire time. I thought the problem was with writing the modified file to the disk so I spent all this time messing around with different formats and whatnot. It turns out if readFileSync doesn't understand the encoding it auto converts whatever it can to utf-8. But since it doesn't understand the other encodings this breaks the characters. My solution was a package called `iconv-lite` that has support for these other formats and can handle them properly.
- Loading branch information
Showing
1 changed file
with
36 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters