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 GetShortPathName
function. The resulting "short" path name is guaranteed not to contain non-latin characters.
- Call
GetShortPathNameW
(unicode version) to get the "short" path string.
- Convert the short path into the ANSI string (use
WideCharToMultiByte
).
- Give the resulting ANSI string to the stupid 3rd-party lib.
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.