unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Magne Ingebrigtsen <larsi@gnus.org>
To: emacs-devel@gnu.org
Subject: Re: undecided vs utf-8
Date: Fri, 05 Nov 2010 14:02:55 +0100	[thread overview]
Message-ID: <m3bp63udmo.fsf@quimbies.gnus.org> (raw)
In-Reply-To: tl78w18v0sq.fsf@m17n.org

Kenichi Handa <handa@m17n.org> writes:

> ??? When the locale is "C", emacs prefers utf-8 the most.
>
> % LANG=C emacs -Q -batch --eval '(message "%s" (car
> (coding-system-priority-list)))'
>
> should prints utf-8.

Let's see...

[larsi@quimbies ~/pgnus]$ echo $LANG
en_US

Right.  Well, I have no idea where that came from...

>> Well, this is about `undecided', and the C layer does DWIM-ish
>> processing when you ask it to decode `undecided', doesn't it?
>
> I don't know which Emacs' behaviour you describe as DWIM-ish.

Uhm...  if you ask a computer to do something vague, and the computer
does this based on settings the user is barely cognisant of, that's the
essence of DWIM.  In this case, it's looking at a string to try to guess
what the charset is ("do something vague"), and pick an answer from the
many possible based on settings the user is barely cognisant of.

I don't really see why you don't think this isn't DWIM...

> I think the best way is to provide users an easy way to
> specify a correct coding-system when they see a decoding
> error as well as the method to customize the default
> coding-system for erc.

So erc should pop up a message saying "even though this looks like
utf-8, I can tell from your locale spec that you're not expecting this,
so here's a list of 45 different charsets to choose from that the string
might be in, and I'll ask you this question for every IRC string until
you set a precedence list of charsets which I'll then force you to
choose between because utf-8 and iso-8859-1 isn't distinguishable
anyway"?  It somehow doesn't seem maximally user-friendly.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen




  reply	other threads:[~2010-11-05 13:02 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-04 22:27 undecided vs utf-8 Lars Magne Ingebrigtsen
2010-11-04 22:40 ` Lars Magne Ingebrigtsen
2010-11-05  0:02   ` Stefan Monnier
2010-11-05  8:01     ` Eli Zaretskii
2010-11-05  2:01 ` Kenichi Handa
2010-11-05  2:32   ` Lars Magne Ingebrigtsen
2010-11-05  4:42     ` Kenichi Handa
2010-11-05 13:02       ` Lars Magne Ingebrigtsen [this message]
2010-11-05  8:09     ` Eli Zaretskii
2010-11-05 13:06       ` Lars Magne Ingebrigtsen
2010-11-05  8:10     ` Eli Zaretskii
2010-11-05 12:28       ` Deniz Dogan
2010-11-05 12:50       ` Lars Magne Ingebrigtsen
2010-11-05  7:56 ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3bp63udmo.fsf@quimbies.gnus.org \
    --to=larsi@gnus.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).