FMOD_System_CreateSound(FManager.System, PAnsiChar(FileName), FModMode, @FMOD, @FMp3Sound);
FMOD expects all strings to be UTF-8, which means that it does support Chinese characters. However, it’s possible that the string you’re passing to the function is encoded with a code page set for the local machine (i.e. ANSI code pages like Windows-1252), meaning that it may not be UTF-8.
There’s two ways to fix this:
- The easiest way is to use the
u8prefix on your string -
const char *path = u8"C:\\my\\path\\here\\";
u8prefix will not work on strings that are not string literals, for example strings retrieved from some other API or system. In this case, you’ll need to convert the string to UTF-8 yourself. On Windows, this can be done with MultiByteToWideChar.
Thank you very much. I’ll try it