Stockfish icon indicating copy to clipboard operation
Stockfish copied to clipboard

Problems with non-asciil characters in paths

Open vondele opened this issue 3 years ago • 5 comments

an EvalFile cannot be used as a setoption if the path contains certain non-ascii characters.

for example setoption name EvalFile value C:\Users\Owner\Desktop\русский\nn-62ef826d1a6d.nnue does not work

similar issue in Leela, we might look there for solutions.. https://github.com/LeelaChessZero/lc0/issues/1474

vondele avatar Apr 11 '21 18:04 vondele

This stackoverflow post seems to have some related info: https://stackoverflow.com/questions/30829364/open-utf8-encoded-filename-in-c-windows

Not sure if we should care much about it in Stockfish

snicolet avatar Apr 11 '21 18:04 snicolet

As an actual finder of this problem, I say that I will wait as long as it takes to get it fixed and if you are not caring so much it's okay, it is a minor problem in the face of making the engine stronger. So take your time. I will adjust for ascii-only paths meanwhile. And another softening fact is that it takes place in SF-console only, using Fish in Arena does not cause any troubles (for some reason).

AndrewTCEC avatar Apr 11 '21 18:04 AndrewTCEC

std::string is just bytes, Arena must be sending the correct encoding to standard input and console is using UTF-8.

dsmsgms avatar Apr 12 '21 23:04 dsmsgms

It seems that UTF-8 console input is buggy at least for the dotnet runtime, if this is related I'm not sure we should code around it.

gvreuls avatar Apr 15 '21 10:04 gvreuls

I cannot reproduce on this my system (Linux). Someone else has to check if we are going to find a potential fix. See link for an attempt. https://github.com/dsmsgms/Stockfish/tree/non_utf8_path/

dsmsgms avatar Mar 15 '23 21:03 dsmsgms