[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Locales and Emacs 21
Edmund GRIMLEY EVANS wrote:
>
> Markus Kuhn <mgk25@xxxxxxxxx>:
>
> > Until then, may be some nice elisp guru can come up with a few lines for
> > your ~/.emacs file that calls the shell command line `locale charmap` and
> > sets the default encoding for every loaded file according to the output.
>
> This would be useful, but it might be even more useful to take account
> of the contents of the file. One of the annoyances of my current Emacs
> 20 set-up, which apparently cannot easily be fixed, is that if I open
> a non-UTF-8 file Emacs turns it into garbage without issuing any kind
> of error or warning. If I made a small change and saved it again, I
> could lose data. But perhaps this has already been fixed in Emacs 21.
Is there a reliable tool for determining the encoding of a file? I know
that distiguishing between 8 bit character sets, particularly between
the various members of ISO 8859 cannot be done with certainty. However,
there shouldn't be any harm in incorrectly guessing one of those if it
is saved the same way. So I guess my question is whether there is
already a tool out there that will tell me whether a file is UTF-8 or
ISO 8859.
--
D. Dale Gulledge, Sr. Programmer,
dsplat@xxxxxxxxxxxxxxxx
C, C++, Perl, Unix (AIX, Linux), Oracle, Java,
Internationalization (i18n), Awk.
-
Linux-UTF8: i18n of Linux on all levels
Archive: http://mail.nl.linux.org/linux-utf8/