Thanks a lot for feedback, that is much appreciated.
I am pretty new to this so I will give it a try and experiment on it...
Riko
JREPL.BAT v8.6 - regex text processor with support for text highlighting and alternate character sets
Moderator: DosItHelp
Re: JREPL.BAT v8.6 - regex text processor with support for text highlighting and alternate character sets
Hello there,
For a dailly usage case in which all files in a folder need to be converted from utf-8 to utf-16 is this script suited ?
So, just run manually script when needed.
Thanks a lot
For a dailly usage case in which all files in a folder need to be converted from utf-8 to utf-16 is this script suited ?
So, just run manually script when needed.
Thanks a lot
Re: JREPL.BAT v8.6 - regex text processor with support for text highlighting and alternate character sets
Converting utf-8 to utf-16 could be done with JREPL, but you would get much better performance with aGerman's CONVERT.exe. Its sole purpose is to convert text files from one encoding to another.
Both utilities process only one file, so you would have to process an entire folder using a FOR loop either way.
Both utilities process only one file, so you would have to process an entire folder using a FOR loop either way.
Re: JREPL.BAT v8.6 - regex text processor with support for text highlighting and alternate character sets
JREPL might be a real good choice because it's a script which works with on-board resources.
CONVERTCP has the disadvantage of being a 3rd party executable. However, if performance matters (e.g. due to big files or a lot of text in total) it might be more suitable for you.
(Direct overwriting of the original file is not supported on purpose.)
Beware of running those scripts twice on the same files!
Steffen
Code: Select all
for %%i in ("*.txt") do cmd /c jrepl "^" "" /f "%%~i|UTF-8" /o "-|UTF-16"
CONVERTCP has the disadvantage of being a 3rd party executable. However, if performance matters (e.g. due to big files or a lot of text in total) it might be more suitable for you.
Code: Select all
for %%i in ("*.txt") do convertcp "UTF-8" "UTF-16" /b /i "%%~i" /o "%%~i.tmp~" && move /y "%%~i.tmp~" "%%~i"
Beware of running those scripts twice on the same files!
Steffen