You are not logged in.
A bat/cmd file with CHCP 65001 and REN command with UTF8 encoded file names is working fine, in all tests so far.
...
So far there are no issues with using CHCP 65001.
Maybe I'm misunderstanding what exactly you're doing, Denis. Are you sure you are testing with UTF-8 characters that cannot also be encoded in ANSI?
Here's my simple test: I have a file named αβγδε.txt that I want to rename. Now I cannot save those 5 characters in an ANSI text file so I save the following as a UTF-8 or Unicode batch file instead:
chcp 65001
ren αβγδε.txt abcde.txt
Guess what - no batch files except for ANSI-encoded ones even run at the command line, which is precisely what that StackOverflow comment pointed out.
Now my question is - how are you getting such non-ANSI UTF-8 filenames to work in a batch file?
Offline
Are you sure you are testing with UTF-8 characters that cannot also be encoded in ANSI?
100% sure. File is UTF8 encoded without BOM.
Here's my simple test: I have a file named αβγδε.txt that I want to rename.
Tested your example and it worked as expected. Tried even Chinese glyphs, no problems. File was saved as UTF8 without BOM.
What's your OS?
Offline
Windows 10. Saved the batch file with ANSI and UTF-8 encoding using Notepad.
Ok, so found the source of the problem. Notepad apparently can save as UTF-8 only with BOM, and such batch files won't run. Perhaps a REMark might need to be added to the file stating that only editors that can save the file as UTF-8 without a BOM should be used.
Offline
Perhaps a REMark might need to be added to the file stating that only editors that can save the file as UTF-8 without a BOM should be used.
ReNamer generates a functioning batch file, that is what matters. User side modifications to this file may or may not break it, but the resulting issues are outside of the scope of this functionality.
Offline