I thinked that was wrong, but, using raster font and codepage 65001, when I run 65001.bat
I get this message on windows 7 japanase:
Code: Select all
the system cannot write to the specified device
but it set correctly the variable.
If i change to codepage 932 I can see that the variable was set ok.
The error message not avoid the creation of the variable.
for avoid dude, I use:
Code: Select all
set "sokoban="
chcp 65001
65001.bat >nul
chcp 932
set sokoban
rem here i see correctly the variable.
Works ok, then dbenham can create a batch encoded as utf8 without bom for set again the variable, but this will works only on windows seven and above.
I have a idea why on windows xp japanase it set wrong or corrupted the variable.
on cmd xp
When cmd start it save a variable like cp= current, OEM_CP if not remember bad.
Then, when cmd run the batch, if you change the codepage, cmd xp use the codepage of the variable when it start for translate from multibyte to widechar, then on windows japanase, even when i do this for run the batch, using other codepage than 65000 (utf7) or 65001 (utf8):
Code: Select all
(
chcp 65001
65001.bat
chcp 932
)
at moment of run 65001.bat it not use 65001 as the codepage for multibytetowidechar, it use the codepage when cmd start, in this case 932. Because this, the variable is corrupted, because is translated using in this case codepage 932 (the codepage when cmd start), and not the current codepage 65001.
I think if is possible, change the default codepage of the system to 65001, then run cmd, change the codepage to other maybe 437, and try use the loader:
Code: Select all
(
chcp 65001
65001.bat
chcp 932
)
for verify this.