emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gnus should accept UTF8 even if UTF-8 is standard


From: Eli Zaretskii
Subject: Re: gnus should accept UTF8 even if UTF-8 is standard
Date: Tue, 21 Oct 2008 14:40:03 +0200

> From: "Stephen J. Turnbull" <address@hidden>
> Cc: address@hidden,
>     address@hidden,
>     address@hidden,
>     address@hidden,
>     address@hidden,
>     address@hidden
> Date: Tue, 21 Oct 2008 21:06:50 +0900
> 
> Eli Zaretskii writes:
> 
>  > >  > That implies that the return value would be a string, not the coding
>  > >  > system itself.  I suggest we return the coding system (or nil), not
>  > >  > just the name.
>  > > 
>  > > The coding system *is* just a name
>  > 
>  > Not in GNU Emacs; see the doc string of `define-coding-system' (in
>  > Emacs 23) or `make-coding-system' (in Emacs 22).
> 
> If that's true, it's a shame; AFAICS there is no real utility to
> exposing the coding system object to Lisp

Emacs does not expose coding systems to Lisp.  A coding system is a
just a symbol with special attributes, as far as Lisp is concerned.

This must be a misunderstanding of some kind, because I'm sure we are
talking about something we both understand.  Let me take a step back
and explain what I meant in my original message:

> > Perhaps something like `canonicalize-coding-system-name' would be good.
> 
> That implies that the return value would be a string, not the coding
> system itself.  I suggest we return the coding system (or nil), not
> just the name.

What I meant is that, instead of returning a _string_, which is the
name of a coding system, it is better to return a _symbol_ of that
coding system.  This will avoid the need to `intern' that string,
which is a gratuitous nuisance, because the function we are discussing
will most probably need to `intern' the string itself, for doing its
job.

I'm sure we both understand the difference between a thing and its
name, so vividly explained by Luis Carrol ;-)

> "utf8" is not a MIME charset (and no form of UTF-8 is an Emacs
> charset), but "utf-8" is an IANA-registered MIME charset.

Yes.

> AIUI, the point of the function is to guess what people who don't
> know what they're doing are trying to express (and to provide some
> interactive convenience to people who do know what they're doing).

Agreed, but in most cases the argument will be a valid MIME charset.
The case of "UTF8" is an exception.  And even in this exceptional
case, I understand that "UTF8" came from some charset= header.  That
is why I suggested coding-system-for-charset.  I don't mind
coding-system-for-mime-charset, either, if that was your point.  (In
Emacs 23+, the original Mule meaning of "charset" will fade out.)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]