App to convert from ANSI to UTF8 on windows

6

1

Possible Duplicate:
Batch-convert files for encoding or line ending under Windows

Hey!

I have many files that are encoded in the ANSI (iso-8859-1) format and I want to change it to utf8.

I am converting one by one using notepad++ but I was wondering if there is any application that will convert them all (I have many files) in a quick and easy way.

Anyone know of one app that will do this?? (free app would be great)

Thanks

AntonioCS

Posted 2009-09-22T14:35:35.517

Reputation: 397

Question was closed 2010-02-25T18:33:10.407

Answers

5

This is a perfect fit for a scripting language to convert Windows-1252 to UTF-8.

hanleyp

Posted 2009-09-22T14:35:35.517

Reputation: 6 519

1iconv does the job without any nonsense. – Charles Stewart – 2010-01-18T10:28:11.287

2

You could try this SourceForge app. From the website:

Codepage Converter - Convert HTML/Text files to different encoding formats e.g. ANSI to UTF-8 or Unicode. Convert multiple files with 1 click. Works with all encodings

alex

Posted 2009-09-22T14:35:35.517

Reputation: 16 172

Thanks for the app, but I don't think it's working. I can see the file as ANSI in notepad++ :(

Maybe this encodes text, but what I really want is the encoding of the file – AntonioCS – 2009-09-22T14:45:34.347

Tried it right now; true, Notepad++ still tells me it's ANSI. Very strange... – alex – 2009-09-22T14:52:07.783

3That's because the program does not mark the files with a BOM at the top, which "tells" Notepad++ the file is UTF-8. It's a Windows thing. to fix it, go to Settings -> New Document/Open Save Directory. Then change the Encoding to "UTF-8 Without BOM", and check "Apply when open ANSI file". Googling will tell you a lot about why you need to do this, and why BOM's are bad (Wikipedia is your friend). – Breakthrough – 2009-09-22T15:39:16.090

0

A bit late, but: If you saved your scripts as 'UTF without BOM' and notepad++ is now opening them as ansi -> you can 'fix' this behaviour by including a string of multibyte characters somewhere in your comments to force notepad++ to recognise the UTF encoding of the file. It's a complete hackjob, but it works ;-)

user18805

Posted 2009-09-22T14:35:35.517

Reputation: