encoding of text files

Michael Hipp Michael
Tue May 24 11:20:28 PDT 2005


Jorge Almeida wrote:
> I only need files in Portuguese. The problem is that they come in latin1
> or UTF8...
> It's all about html files. I want to write accented characters and then
> filter the file through a script in order to replace them by html code.
> The script uses Perl substitution operator. Example:
>     with "s/?/\ç/g;" in the script,
>     "po?o" in a latin1 encoded file will be substituted by "poço"
>     But if the file is UTF8 I get "poÃ?o". Nasty!
> Using "recode UTF8..latin1 file" would solve the problem, but one has to 
> know that it's UTF8 encoded...

Does the 'file' command do what you want?

Michael


More information about the Linux-users mailing list