public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "johannes at sipsolutions dot net" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug locale/2373] Restrict UTF-8 to 17 planes, as required by RFC 3629
Date: Sat, 06 Jun 2020 21:53:42 +0000	[thread overview]
Message-ID: <bug-2373-131-znHmOadxnX@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-2373-131@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=2373

--- Comment #8 from Johannes Berg <johannes at sipsolutions dot net> ---
Oh, ok. The original comment here seemed to imply that ISO was the last one to
hold out for more space than the others.


To carry over some discussion from the bug I originally filed (which was since
closed as duplicate in favour of this one):

This came up because Python does this conversion using mbstowcs() and/or
mbrtowc(), but then later goes to check that valid characters were returned.

The python discussion is here:

https://bugs.python.org/issue35883


Note that this isn't just about the range, but also the RFC prohibits the
surrogate pair reservations:


RFC 3629:

   The definition of UTF-8 prohibits encoding character numbers between
   U+D800 and U+DFFF, which are reserved for use with the UTF-16
   encoding form (as surrogate pairs) and do not directly represent
   characters.


(Python internally may actually allow using this in an UTF-8-like encoded
string [that they call utf-8b] to carry arbitrary bytes around.)

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2020-06-06 21:53 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-2373-131@http.sourceware.org/bugzilla/>
2020-06-02 10:37 ` [Bug locale/2373] iconv allows encoding characters above U+10FFFF in UTF-8 fweimer at redhat dot com
2020-06-02 11:33 ` fweimer at redhat dot com
2020-06-02 11:38 ` [Bug locale/2373] Restrict UTF-8 to 17 planes, as required by RFC 3629 fweimer at redhat dot com
2020-06-05 20:42 ` johannes at sipsolutions dot net
2020-06-05 21:39 ` schwab@linux-m68k.org
2020-06-06 21:53 ` johannes at sipsolutions dot net [this message]
2020-06-07  5:37 ` fw at deneb dot enyo.de
2020-06-07  6:17 ` schwab@linux-m68k.org
2020-06-30 13:05 ` fw at deneb dot enyo.de
2020-06-30 13:18 ` schwab@linux-m68k.org
2020-06-30 14:56 ` joseph at codesourcery dot com
2023-03-01 14:37 ` roman.zilka at gmail dot com

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

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

  git send-email \
    --in-reply-to=bug-2373-131-znHmOadxnX@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@sourceware.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.
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).