RCProject::loadFromFile(): projectFilePath doesn't handle correctly all Unicode

RCProject::loadFromFile(): projectFilePath doesn't handle correctly all Unicode

lamorlette
Advocate Advocate
853 Views
3 Replies
Message 1 of 4

RCProject::loadFromFile(): projectFilePath doesn't handle correctly all Unicode

lamorlette
Advocate
Advocate

To open files with names containing Unicode characters with RCProject::loadFromFile(), one has to give a wchar_t[] or a std::wstring Unicode string, coded in UTF16 which is the Windows standard, for the projectFilePath parameter.

 

Unfortunately, after many tries, I found out that it works correctly only if I use UTF16 characters ≤ 00FF.

For example, file_ÿ.rcp loads correctly but not file_Ā.rcp.

 

 

@benglin Could you please try and tell me if you get the same behaviour, or if I am doing something wrong?

854 Views
3 Replies
Replies (3)
Message 2 of 4

benglin
Autodesk
Autodesk

Thanks @lamorlette, I'll look at this soonest I can Man Happy

"https://damassets.autodesk.net/content/dam/autodesk/logos/autodesk-logo-primary-rgb-black-small_forum.png"
0 Likes
Message 3 of 4

zhaoyang_ma
Autodesk
Autodesk

@lamorlette Thanks for your feedback! One question though: when you say loadFromFile does not work with some unicode, what does it exactly mean? Is it RCProject::loadFromFile returns a null pointer?

0 Likes
Message 4 of 4

lamorlette
Advocate
Advocate

@zhaoyang_ma When calling RCProject::loadFromFile() with a file named file_Ā.rcp:

  • loadFromFile() returns a null pointer;
  • loadFromFile() set the error code to rcInvalidProject.
0 Likes