There is a 3rd lib only accept char* filename e.g. 3rdlib_func_name(char* file_name). Every things get wrong when I provide a filename in Chinese or Japanese.
Is there any way to make this lib open UNICODE filename? The program is running on Windows.
Thanks for your reply.
We has a similar problem too. Luckily there’s a solution, though it’s kinda tricky.
If the file/directory already exists – you may use the
GetShortPathNamefunction. The resulting “short” path name is guaranteed not to contain non-latin characters.GetShortPathNameW(unicode version) to get the “short” path string.WideCharToMultiByte).Now, if the file/directory doesn’t exist yet – you may not obtain its short pathname. In such a case you should create it first.