Windows tool to convert large text file from UTF-8 to “Windows Unicode” (UTF-16)

unicodewindows 7

I need to view large Unicode text files (current version is 2,379,415,348 bytes) on Windows 7.

Normally I prefer UTF-8 but, but after looking on SuperUser it seems the best Windows large file viewer can't handle UTF-8 so I don't mind doing one-off conversions of these files to UTF-16-LE until a better viewer comes along.

So in the meantime I need a tool that can convert the encoding. Note that I can't use an editor for this or I would just view the file in that editor. Either a command line or GUI tool would be fine.

(I have a netbook maxed out to 2G RAM, sometimes I can view these files fine in gVim but I often have lots of browser windows open and have run out of memory plenty of times. LTFViewer can view text files right from the disk without loading the whole thing into RAM)

Best Answer

GNU iconv has a Windows version.

iconv -f utf-8 -t utf-16le < in.txt > out.txt