unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Werner LEMBERG <wl@gnu.org>
Cc: 12291@debbugs.gnu.org, Curtis Smith <smithcu@gvsu.edu>
Subject: bug#12291: [rev 109796] wrong UTF-8 handling
Date: Thu, 27 Jan 2022 17:32:53 +0100	[thread overview]
Message-ID: <87y231kukq.fsf@gnus.org> (raw)
In-Reply-To: <20120828.074720.480105751.wl@gnu.org> (Werner LEMBERG's message of "Tue, 28 Aug 2012 07:47:20 +0200 (CEST)")

Werner LEMBERG <wl@gnu.org> writes:

> Have a look at the attached file, containing a single character.
> (It's transmitted as binary to avoid e-mail encoding issues).  It
> contains a single, four-byte UTF-8 encoded character (0xF4 0xB5 0x87
> 0x9E, which would map to the non-existent Unicode character code
> U+1351DE).  If I load this file as UTF-8 encoded, Emacs gives this as
> the output of `C-u C-x =':
>
>                position: 1 of 2 (0%), column: 0
>               character: 二 (displayed as 二) (codepoint 20108, #o47214, #x4e8c)
>       preferred charset: unicode (Unicode (ISO10646))

(I'm going through old bug reports that unfortunately weren't resolved
at the time.)

This has changed at some point between this was reported and now:

             position: 1 of 2 (0%), column: 0
            character:  (displayed as ) (codepoint 1266142, #o4650736, #x1351de)
              charset: emacs (Full Emacs charset (excluding eight bit chars))
code point in charset: 0x1351DE
               syntax: w 	which means: word
             category: L:Strong L2R
             to input: type "C-x 8 RET 1351de"

So Emacs now displays more accurate information about the utf-8
sequence.

It was pointed out that this sequence is outside the Unicode range,
which only extends up to U+10FFFF, and that Emacs should perhaps display
this as a number of raw bytes instead.  Is that something we still want
to pursue, or is Emacs behaving like we want to here?  Eli?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





  parent reply	other threads:[~2022-01-27 16:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-28  5:47 bug#12291: [rev 109796] wrong UTF-8 handling Werner LEMBERG
2012-08-28  9:03 ` Andreas Schwab
2012-08-28 14:57 ` Kenichi Handa
2012-08-28 19:22   ` Werner LEMBERG
2012-08-31 10:40     ` Eli Zaretskii
2012-09-03  0:59       ` Kenichi Handa
2012-09-03  2:40         ` Eli Zaretskii
2022-01-27 16:32 ` Lars Ingebrigtsen [this message]
2022-01-27 16:52   ` Eli Zaretskii
2022-02-25  2:33     ` Lars Ingebrigtsen

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=87y231kukq.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=12291@debbugs.gnu.org \
    --cc=smithcu@gvsu.edu \
    --cc=wl@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).