S
S
sysadm2012-11-14 04:18:52
cmd/bat
sysadm, 2012-11-14 04:18:52

How to change file encoding using .bat tools?

I ask for your help.
You need to change the encoding of the contents of the .ini file from UCS-2 Little Endian to ANSI using a .bat file that will later be included in the scheduler.
Let me explain a little why I need it. There is a certain .ini file containing information about users, this file is copied to a remote server on a schedule and parsed there through php, the contents of the file are displayed on the site page. But if you copy a file with native encoding (UCS-2 Little Endian), an error occurs during parsing and you must first convert everything to ANSI encoding.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
paran01k, 2012-11-14
@paran01k

gnuwin32.sourceforge.net/packages/libiconv.htm

iconv.exe -c -s -f UCS-2 -t UTF-8 input_filename.ini > output_filename.ini

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question