Possible Duplicate:
App to convert from ANSI to UTF8 on windows
Does anyone know of a freeware or open source program to convert .txt files to unicode?
Possible Duplicate:
App to convert from ANSI to UTF8 on windows
Does anyone know of a freeware or open source program to convert .txt files to unicode?
As specified by Idigas, .txt is not an encoding. I'm assuming you meant these .txt files used the default encoding when you saved them, which I believe is set to ANSI if you used Notepad on Windows.
You'll need to know the initial format before converting them, but you can use iconv. You haven't specified your operating system, but you can get iconv for Linux, Windows, and Mac. I believe it is already included in most Linux distributions.
example:
$iconv -f ms-ansi -t utf-8 ansi.txt > utf-8.txt
.txt is a format, unicode is an encoding.
Did you mean, maybe, ASCII to let's say, UTF-16 ? Vim perhaps - not batch per se, but with its line command capabilities it can be made automated to a certain point. But this is merely speculating - could you please refine your question as to what you're trying to accomplish.
ms-ansi.ms-ansihere actually means code page 1252 Western European, which other locales wouldn't match. The naming of this code page “ANSI” has always been problematic; it is actually a Microsoft invention that has nothing to do with ANSI! – bobince Jan 18 '10 at 02:26iconvis concerned. i prefer it since it more accurately describes the actual encoding. – quack quixote Jan 18 '10 at 04:50