June 04, 2009

Encodings von Dateien wandeln mit iconv

« Vnstat - Netzwerk analysieren | Main | OSGI Webapplikation mit PAX Web »

Nach wie tritt es oft auf. Das bekannte Encoding Problem. ISO-8859-1 Datei werden im UTF-8 Modus gebraucht und verursachen Darstellungsfehler in der Anzeige. Ein nettes Linux Kommando zur Wandlung stellt iconv dar.

Eine Wandlung von UTF-8 in ISO-8859-1 sieht wie folgt aus:

iconv -f UTF-8 -t ISO-8859-1 index.html

Weitere Optionen sind (entnommen der Manpage):

...
--from-code, -f encoding
Convert characters from encoding
--to-code, -t encoding
Convert characters to encoding
--list
List known coded character sets
--output, -o file
Specify output file (instead of stdout)
--verbose
Print progress information. 
Grüße
Rafael

Technorati Tags:

Posted by rafael.sobek at 1:05 PM in Uncategorized

 

[Trackback URL for this entry]

Your comment:

(not displayed)
 
 
 

Live Comment Preview:

 
« June »
SunMonTueWedThuFriSat
 123456
78910111213
14151617181920
21222324252627
282930