Issue #33 new

A encoding issue about NPAPI-chrome-file-api

Butai Xianran
created an issue

Hi, I can't find an issue page for NPAPI-chrome-file-api, so I think may be I can report this issue here...

When using NPAPI-chrome-file-api under win7 32 with asian characters, all the asian words turned into garbled characters.

you can check some issue report pictures here, this chrome addon named tagspaces used NPAPI-chrome-file-api:
https://github.com/uggrock/tagspaces/issues/13

And I checked out NPAPI-chrome-file-api's source code, figure that all the filename in type string of NPAPIFileIOforChromeAPI.cpp need to be modified into wstring.

for example: "filename().generic_string();" should be "filename().generic_wstring();" for windows.

I tried to fix this and it's worked! all the garbled characters are gone!

but there is still an encoding issue with the path: "(std::string strPath)" and "path p(strPath);"

Which is weird, the boost v3 document says PATH class now could handle both windows and linux path.

But in my test, when strPath included asian characters, all the function like exist(p) or is_directory(p) will fail.

Now I have no idea how to deal with it, hoping you can fix this problem....

My test env:

Chrome 30; win 7 32 chinese edition; FireBreath: lastest; cmake: lastest; visual studio 2012 express;

Comments (1)

  1. Log in to comment