Convert a file in UTF8 format to UTF16 on command-line
I have a tool that outputs a UTF8 file. This file is to serve as an output to another utility that functions with a UTF16 input.
Is it possible to write a small script that will convert the UTF8 to UTF16 so that I can put it in a batch file.
Am a newbie to Java and maybe this question has already been handled. I have searched quite a bit but have not found anything of that type.
Any help most gratefully ackowledged
Re: Convert a file in UTF8 format to UTF16 on command-line
Look at the InputStreamReader and OutputStreamWriter classes. Their constructors take parameters for different charactersets.