View previous topic :: View next topic |
Author |
Message |
SvenFischer Veteran
Joined: 05 Feb 2003 Posts: 1033 Location: Berlin
|
Posted: Fri Jul 08, 2005 10:49 am Post subject: Dateien anhand Kodierung (z.B. 8859-1) finden |
|
|
Hallo,
ich hatte vor längerem eine Umstellung auf UTF-8. Leider liegen in meinem /home noch immer Dateien mit der alten Kodierung. Eigentlich stört das kaum, aber k3b will einfach nicht das alte Zeug brennen. Ich habe von einem Programm gehört, das eine umkodierung vornimmt. Könnte ichdas Problem auch lösen, indem ich das alles in ein .tar packe und die HD neu formatiere und die Dateinen wieder drauf packe? _________________ Core2Duo, 4GB RAM, AMD/ATI 4850 and nice person in front! |
|
Back to top |
|
|
Fabiolla Apprentice
Joined: 04 Mar 2004 Posts: 277 Location: somewhere
|
Posted: Fri Jul 08, 2005 8:28 pm Post subject: |
|
|
Hallo,
mit file -i bekommt man zumindest bei Textdateien die Kodierung heraus.
Quote: |
file -i *
install.hlp: text/plain; charset=utf-8
repair.hlp: text/plain; charset=utf-8
security.hlp: text/plain; charset=utf-8
template.txt: text/plain; charset=utf-8
unicode.hlp: text/plain; charset=utf-8
xfce.hlp: text/plain; charset=utf-8
xkeyboard.hlp: text/plain; charset=utf-8
|
Es gibt leider den Nachteil, dass bei vielen Dateien (z.B. Shell-Scitpen) folgendes ausgegeben wird:
Quote: |
file -i *
backup.sh: application/x-shellscript
checkout.sh: application/x-shellscript
connect.sh: application/x-shellscript
create.sh: application/x-shellscript
disconnect.sh: application/x-shellscript
findcruft: application/x-shellscript
save.sh: application/x-shellscript
|
Eine Umkodierung ist z.B. mit iconv möglich
Quote: |
Auszug aus http://www.gentoo.org/doc/en/utf-8.xml
(substitute iso-8859-1 with the charset you are converting from)
(Check the output is sane)
# iconv -f iso-8859-1 -t utf-8 filename
(Convert a file, you must create another file)
# iconv -f iso-8859-1 -t utf-8 filename > newfile
|
lg |
|
Back to top |
|
|
SvenFischer Veteran
Joined: 05 Feb 2003 Posts: 1033 Location: Berlin
|
Posted: Wed Jul 13, 2005 11:44 am Post subject: |
|
|
Also,
der Befehl convmw (gleichnamiges ebuild vorhanden) konvertiert nur die Dateien, die noch nicht in utf8 konvertiert wurden.
convmv --notest -r -f iso-8859-1 -t utf8 *
Endlich habe ich nun eine ganze Festplatte ohne Sonderzeichenmüll, die MP3 Sammlung macht wieder Spaß. _________________ Core2Duo, 4GB RAM, AMD/ATI 4850 and nice person in front! |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|