How to bring the path of a file from a 16-bit string to 8-bit so that it is correctly processed even if there is Unicode in the source string

  • It is possible if all the characters from the file path are displayed in the target encoding. If not, then no. See en.wikipedia.org/wiki/Iconv and further links. - alexlz


2 answers 2

See the cwchar header and the functions in it that are responsible for translating wchar_t strings into byte strings and back. Especially wcsrtoms .

    For some reason it seems to me that in any way. That is, of course you can bring, but the correct processing will end there.

    • Yes you can, but I don’t know how - char [] returns to the file open dialog, and if there is a Cyrillic on the way, one Cyrillic character becomes two kryakozyabrami but everything is correctly processed, but other operations with folders give 16 bit strings all in under 8 sharpened, brutal type conversion works too low for paths from Latin. - psionic
    • @psionic? is this your Windows? - avp