Closed mrkingmidas closed 11 hours ago
The filename is just passed "as is" UTF-8 encoded to the command to execute, with the filename surrounded in double quotes ("
). Because system()
expects a regular character string, it should also accept it in UTF-8. Surprised this is not the case, apparently, which is due to Windows' clunky _system()
call, and the use of code pages in this case I assume. There is also _wsystem()
that might work. I will experiment with that and see what happens.
Ok. That works with a Chinese-named file to view with the more
command. I have not tried setting a code page, but it should work now with _wsystem()
.
In TUI, pressing F2 transmits an incorrect file name if it contains non-ASCII characters. Tried without success:
SET Editor=notepad.exe
SET Editor=micro.exe
chcp 65001
Windows 10 21H1, lang: ru, codepage: 866