How do you batch convert UTF-16 to UTF-8?
Hi, I have a lot of files that I have exported from the AAD CSDB and I want to convert them in bulk from UTF-16 to UTF-8. I am familiar with the following ACL:
save_as -encoding utf-8 myfilename.xml
This works but is too laborious to repeat for every file. So, I have attempted to create a Windows Command Line batch file to open Arbortext Editor and execute the command on the files in a local directory using the -c switch. At the moment I get nothing out of it. The script does not open a dialog and ask to save the file. I would prefer to merely replace the current file. Does anyone have a suggestion as to how the script might be improved in order to process multiple files?
:REM convert all files in directory from UTF-16 to UTF-8
ECHO *********************
ECHO CONVERT UTF16 TO UTF8
ECHO *********************
for %%f in (*.xml) do ( "C:\Program Files (x86)\PTC\Arbortext Editor\bin\x86\editor.exe" -c "save_as -encoding utf-8" %%f )
ECHO *********************
ECHO D O N E
ECHO *********************

