Neil Pate Posted August 25, 2020 Report Share Posted August 25, 2020 Learned something today. I had an error with some software that relies on a command being called through a batch file. My code that has worked for years was all of a sudden failing. After a bit of digging I noticed my user has some French characters in their surname, so the path to the temporary files I was generating had these non-ASCII characters in it! If I ran my batch file from CMD.exe Windows was replacing the French character with multiple ASCII characters which is obviously not going to work. The simple solution is to change the active code page to 65001 which is UTF-8. (See: https://stackoverflow.com/questions/11962172/echo-utf-8-characters-in-windows-batch), so all I did was add the chcp 65001 command to the beginning of the batch file et voilà! 1 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.