Closed smvilar closed 9 years ago
hmm, there is a reason this is set this way, let me find the link
I can make a running example of the issue if you need. Maybe the charset should be parameterized for the case is text or binary?
The issue is two way, for example with png images :
Specifically, the first byte 0x89 when round-tripped through utf-8 gets converted into the replacement character 0xffd and comes back (utf-8 encoded) as 0xef 0xbf 0xbd.
This breaks loading them and other binary files and the x-user-defined mime override allows this to work otherwise. I will think over the best option for the API because it's currently platform specific, but either way it shouldn't be hardcoded.
btw, what end point on the api are you calling to face the issue? loadText
or direct etc?
I'm using loadJSON
and loadText
Updated all internals to use non-binary flag for text loading, through an options flag. Should resolve it, let me know!
Fixes reading UTF-8 text files in web target.