locked
Winjs, "error: No mapping for the Unicode character exists in the target multi-byte code page" with FileIO.readTextAsync

    Question

  • Hi,

    I am writing a windows store app with winjs2.0 on won8.1.

    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 file is in Windows.Storage.ApplicationData.current.localFolder

    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?

    Friday, January 10, 2014 8:26 AM

Answers

  • found it. 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.

    Friday, January 10, 2014 9:13 AM