mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Jens Gustedt <jens.gustedt@inria.fr>
To: musl@lists.openwall.com
Subject: Re: [PATCH] implement a private state for the uchar.h functions
Date: Tue, 11 Nov 2014 14:53:02 +0100	[thread overview]
Message-ID: <1415713982.2457.1704.camel@eris.loria.fr> (raw)
In-Reply-To: <20141111032110.GG22465@brightrain.aerifal.cx>

[-- Attachment #1: Type: text/plain, Size: 2182 bytes --]

Am Montag, den 10.11.2014, 22:21 -0500 schrieb Rich Felker:
> On Sun, Nov 09, 2014 at 11:18:08AM +0100, Jens Gustedt wrote:
> > The C standard is imperative on that:
> > 
> >   7.28.1 ... If ps is a null pointer, each function uses its own internal
> >   mbstate_t object instead, which is initialized at program startup to
> >   the initial conversion state;
> 
> Thanks. Actually I originally had this functionality and removed it
> because it seemed to be unnecessary, due to the requirement being
> buried in that introductory text rather than the descriptions of the
> individual functions. I figured the committee had just intentionally
> decided not to copy this backwards functionality from the old
> multibyte functions into the new uchar ones, but sadly that's not the
> case...

Yes these are bizarre additions. That has almost a dozen different
static states for all of the different restartable functions.

Perhaps I misunderstood something, but isn't it that in direction mbs
-> charXX_t these functions allow to handle surrogates, but the other
way around is not possible?

From that new unicode support in C11 I get some of the ideas, but some
things remain quite misterious

 - having a standard way to specify unicode characters inside a string
   of any kind through \u and \U is really a great achievement

 - introducing types charXX_t and constants literals with u and U is
   already less clear. The only thing that can be done with them is
   conversion, there are no auxiliary functions. In particular the
   character counting and classification problems for surrogates is
   still not solved.

 - introducing a u8 prefix for strings that guarantees utf8 encoding
   for mbs sounds nice. But then there is nothing that relates these
   to "normal" string literals. What are we supposed to do with these?

Jens

-- 
:: INRIA Nancy Grand Est ::: AlGorille ::: ICube/ICPS :::
:: ::::::::::::::: office Strasbourg : +33 368854536   ::
:: :::::::::::::::::::::: gsm France : +33 651400183   ::
:: ::::::::::::::: gsm international : +49 15737185122 ::
:: http://icube-icps.unistra.fr/index.php/Jens_Gustedt ::



[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2014-11-11 13:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-09 10:18 Jens Gustedt
2014-11-11  3:21 ` Rich Felker
2014-11-11 13:53   ` Jens Gustedt [this message]
2014-11-11 14:39     ` Rich Felker
2014-11-11 16:03       ` Jens Gustedt
2014-11-15 17:29 ` Rich Felker
2014-11-15 17:57   ` Jens Gustedt
2014-11-15 20:10     ` Rich Felker

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=1415713982.2457.1704.camel@eris.loria.fr \
    --to=jens.gustedt@inria.fr \
    --cc=musl@lists.openwall.com \
    /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.vuxu.org/mirror/musl/

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 NNTP newsgroup(s).