Search code examples
unicodewindows-8winjswindows-8.1

Winjs, error reading file with FileIO.readTextAsync


I am reading a .json file from disk using Windows.Storage.FileIO.readTextAsync. All is fine until I put some non english letters in the file, like Æ Å Ø

The error I get is (rough translation from Danish language): WinRT: No mapping for the Unicode character exists in the target multi-byte code page.

any idea how to read those chars in WinJs?


Solution

  • I found the problem.

    when I created the file manually with notepad I set it to type ANSII instead of utf8. I reopened the file -> save as and the changed the type and overwrote it.