none
Exception from reading a content file RRS feed

  • 问题

  • Dear All

             I got a Exception when I using below code to reading a content file in Windows Metro App project.

             When I do

    var rootFolder = await KnownFolders.DocumentsLibrary.GetFolderAsync("DataSource");

    var file = await   rootFolder.GetFileAsync("test.docx");

    string   content = await FileIO.ReadTextAsync(file);

             I got:

    No mapping for the Unicode character exists in the target multi-byte code page. (Exception from HRESULT: 0x80070459)

    My Visual Studio save the files using “Unicode (UTF-8 with signature) - Codepage 65001”.It seem normal….

             What’s wrong?

    2012年11月19日 9:39

全部回复

  • How do you store this file in your system? Could you please share me the store this file code, or could you please share me the file ( you can share it on SkyDrive.com ). Then I can test that in my side. Since just the code, and the exception, it is hard to know the root cause.

    Bob Bao [MSFT]
    MSDN Community Support | Feedback to us

    2012年11月20日 5:14
    版主