Mail Archives: djgpp-workers/1998/09/17/10:07:11
On Thu, 17 Sep 1998, Vik Heyndrickx wrote:
> Keep a directory of filenames within one special db-file along with
> extra information indicating whether a file is true binary, unixy text
> or DOS text. Whenever a call to fopen (et al.) is issued, fopen searches
> this directory to know the nature of the file.
It's funny how we are reinventing MULE (the multi-lingual extensions to
Emacs) in this thread.
The current implementation of MULE in Emacs 20.3 guesses the file's
encoding--both the CR/LF vs Newline and other necodings, like Unicode
and ISO--by reading a small part of the file, and then uses that guess
to decode the rest. (There are also provisions to force Emacs to use
specific decoding scheme for a given file, in case the user knows that up
front.)
But there are those who believe that this guesswork will never work well
enough, and instead submit that Emacs should allow to create a
directory-level description file that holds that info. RMS doesn't buy
that yet (probably because he himself never uses anything but plain
ASCII), which infuriates many people and causes them to stay away of Emacs
20.
But I don't think any of this is a good idea for a general-purpose library
such as libc.a. I'm petrified to even think how this could misfire when
the info is wrong, and how complicated will it be to maintain such
data-bases.
Anyway, I think the original proposal was meant to be a good default
behavior, precisely for those who cannot be bothered to set up such
elaborate data-bases.
- Raw text -