Hello people of Stack Overflow. Me and my friend are making a game in the Batch/.bat programming language. Up until this point, we have had no problems that we couldnt fix. When I started translating it into the Spanish version, however, we ran into problems. When I tried to have the program "echo" words in Spanish with accents (e.g. Á, É) it wouldnt work. I had set up a test page which had the program echo "áéíóú"
but it came out with something else, I cannot copy and paste it right now. I ran into a similar problem when I tested the Russian/Cyrillic keyboard. I had set the character set to 437 when testing the accents and 1251 when testing the Russian. When I saved it, the special characters even changed in the Bat file code. Is there anything special I need to do to make the special characters appear? Again, I am only trying to use them on the echo command.
相关问题
- Inheritance impossible in Windows Runtime Componen
- how to get running process information in java?
- Is TWebBrowser dependant on IE version?
- How can I have a python script safely exit itself?
- I want to trace logs using a Macro multi parameter
相关文章
- 如何让cmd.exe 执行 UNICODE 文本格式的批处理?
- 怎么把Windows开机按钮通过修改注册表指向我自己的程序
- Warning : HTML 1300 Navigation occured?
- Bundling the Windows Mono runtime with an applicat
- Windows 8.1 How to fix this obsolete code?
- CosmosDB emulator can't start since port is al
- How to print to stdout from Python script with .py
- Determine if an executable (or library) is 32 -or
Save the batch file in UTF-8 without BOM signature and use UTF-8 codepage:
Or make a file with messages for each language and save it in unicode encoding (UTF-16LE):
Then load the translations:
Now the messages should be displayed correctly by default since the system console codepage usually corresponds to the language set in regional settings.
You can keep these messages in readable form inside the batch file saved as UTF-8 without BOM signature and use an embedded VBScript/powershell code to extract to
messages.txt
in UTF16-LE encoding:And then load it as shown above.
Use in batch file
SETLOCAL EnableDelayedExpansion
@CHCP 65001 >NUL