When I use CkStringArray's LoadFile or LoadFromFile2 methods to load the content of a text file where the path contains Danish, Swedish and most likely characters from other languages, it fails with the following:
The path in question contains the letter 'ø' as in øllebrød: D:\test\øllebrød\test.txt. If I use CkString's LoadFile method it appears to work fine.
I tested but did not find a problem.
Maybe this is the problem: When a "const char " is passed to a Chilkat method, the default interpretation is that the bytes are characters represented in the ANSI encoding. If you are passing a "const char " that contains utf-8 encoded, bytes, you must first tell the object instance that it should interpret incoming "const char *" args as utf-8. You would do this by setting the "Utf8" property (which is common to all Chilkat C++ classes) to true. For example:
CkString strPath; // Passing ANSI here because it's a string literal. strPath.append("D:/test/øllebrød/test.txt");
answered May 08 '13 at 11:06