Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Dateien anhand Kodierung (z.B. 8859-1) finden
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
SvenFischer
Veteran
Veteran


Joined: 05 Feb 2003
Posts: 1033
Location: Berlin

PostPosted: Fri Jul 08, 2005 10:49 am    Post subject: Dateien anhand Kodierung (z.B. 8859-1) finden Reply with quote

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
View user's profile Send private message
Fabiolla
Apprentice
Apprentice


Joined: 04 Mar 2004
Posts: 277
Location: somewhere

PostPosted: Fri Jul 08, 2005 8:28 pm    Post subject: Reply with quote

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
View user's profile Send private message
SvenFischer
Veteran
Veteran


Joined: 05 Feb 2003
Posts: 1033
Location: Berlin

PostPosted: Wed Jul 13, 2005 11:44 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Page 1 of 1

 
Jump to:  
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