* [gentoo-user-de] Zeichensatz ermitteln
@ 2008-01-06 14:40 Magnus Rosenbaum
2008-01-07 11:40 ` Bertram Scharpf
0 siblings, 1 reply; 4+ messages in thread
From: Magnus Rosenbaum @ 2008-01-06 14:40 UTC (permalink / raw
To: gentoo-user-de
[-- Attachment #1: Type: text/plain, Size: 710 bytes --]
Hallo,
ich habe bisher des öfteren "file -ib" benutzt um von einem Shellskript
aus den Zeichensatz von Dateien zu ermitteln. Also so:
magnum@ibookx ~ $ file -ib test.tex
text/plain; charset=iso-8859-1
Seit der Version =sys-apps/file-4.20 hat sich das Verhalten bei einigen
Dateien aber geändert:
magnum@ibookx ~ $ file -ib test.tex
text/x-tex
Gibt's noch einen anderen Weg, den Zeichensatz von Dateien zu ermitteln?
Schöne Grüße,
Magnus
--
Carl Magnus Rosenbaum M.A.
Administration - Programmierung - Weiterbildung http://cmr.cx/
Tel: +49 89 70066626 Fax: +49 89 70066686 Mobil: +49 163 7006662
PGP Fingerprint: DEBC 3C99 EF1D 74F0 D4C7 EFF5 C268 3690 0EA1 7641
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 256 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-user-de] Zeichensatz ermitteln
2008-01-06 14:40 [gentoo-user-de] Zeichensatz ermitteln Magnus Rosenbaum
@ 2008-01-07 11:40 ` Bertram Scharpf
2008-01-07 11:45 ` Bertram Scharpf
2008-02-11 20:20 ` Magnus Rosenbaum
0 siblings, 2 replies; 4+ messages in thread
From: Bertram Scharpf @ 2008-01-07 11:40 UTC (permalink / raw
To: gentoo-user-de
Hallo,
Am Sonntag, 06. Jan 2008, 15:40:02 +0100 schrieb Magnus Rosenbaum:
> ich habe bisher des öfteren "file -ib" benutzt um von einem Shellskript
> aus den Zeichensatz von Dateien zu ermitteln. Also so:
>
> magnum@ibookx ~ $ file -ib test.tex
> text/plain; charset=iso-8859-1
>
> Seit der Version =sys-apps/file-4.20 hat sich das Verhalten bei einigen
> Dateien aber geändert:
>
> magnum@ibookx ~ $ file -ib test.tex
> text/x-tex
>
> Gibt's noch einen anderen Weg, den Zeichensatz von Dateien zu ermitteln?
Spontan fällt mir ein, wie man zumindest UTF-8 abgrenzen kann, wenn ich
es auch nicht sehr schön finde:
iconf -f utf-8 -t iso8859-15 <test.tex >/dev/null 2>/dev/null && echo utf-8
Allerdings verhält `file' sich bei mir nicht wie von Dir bemängelt:
$ file -ib dummy.tex
text/plain; charset=iso-8859-1
$ equery l sys-apps/file
[ Searching for package 'file' in 'sys-apps' among: ]
* installed packages
[I--] [ ] sys-apps/file-4.21-r1 (0)
Gruß,
Bertram
--
Bertram Scharpf
Stuttgart, Deutschland/Germany
http://www.bertram-scharpf.de
--
gentoo-user-de@lists.gentoo.org mailing list
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-user-de] Zeichensatz ermitteln
2008-01-07 11:40 ` Bertram Scharpf
@ 2008-01-07 11:45 ` Bertram Scharpf
2008-02-11 20:20 ` Magnus Rosenbaum
1 sibling, 0 replies; 4+ messages in thread
From: Bertram Scharpf @ 2008-01-07 11:45 UTC (permalink / raw
To: gentoo-user-de
> iconf -f utf-8 -t iso8859-15 <test.tex >/dev/null 2>/dev/null && echo utf-8
s/iconf/iconv/
Entschuldigung.
--
Bertram Scharpf
Stuttgart, Deutschland/Germany
http://www.bertram-scharpf.de
--
gentoo-user-de@lists.gentoo.org mailing list
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-user-de] Zeichensatz ermitteln
2008-01-07 11:40 ` Bertram Scharpf
2008-01-07 11:45 ` Bertram Scharpf
@ 2008-02-11 20:20 ` Magnus Rosenbaum
1 sibling, 0 replies; 4+ messages in thread
From: Magnus Rosenbaum @ 2008-02-11 20:20 UTC (permalink / raw
To: gentoo-user-de
[-- Attachment #1: Type: text/plain, Size: 835 bytes --]
Bertram Scharpf schrieb:
> Spontan fällt mir ein, wie man zumindest UTF-8 abgrenzen kann, wenn ich
> es auch nicht sehr schön finde:
>
> iconf -f utf-8 -t iso8859-15 <test.tex >/dev/null 2>/dev/null && echo utf-8
Ja, wirklich nicht sehr schön.
> Allerdings verhält `file' sich bei mir nicht wie von Dir bemängelt:
>
> $ file -ib dummy.tex
> text/plain; charset=iso-8859-1
Ja, offensichtlich hängt es vom erkannten Dateiformat ab, ob "file" auch
noch den Zeichensatz ermittelt, oder das nicht für notwendig hält.
Entschuldige bitte die späte Antwort,
Magnus
--
Carl Magnus Rosenbaum M.A.
Administration - Programmierung - Weiterbildung http://cmr.cx/
Tel: +49 89 70066626 Fax: +49 89 70066686 Mobil: +49 163 7006662
PGP Fingerprint: DEBC 3C99 EF1D 74F0 D4C7 EFF5 C268 3690 0EA1 7641
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-02-11 20:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-06 14:40 [gentoo-user-de] Zeichensatz ermitteln Magnus Rosenbaum
2008-01-07 11:40 ` Bertram Scharpf
2008-01-07 11:45 ` Bertram Scharpf
2008-02-11 20:20 ` Magnus Rosenbaum
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox