Web lists-archives.com

Re: Unicode width data inconsistent/outdated




On Jul 26 23:43, Thomas Wolff wrote:
> Am 26.07.2017 um 11:50 schrieb Corinna Vinschen:
> > On Jul 26 03:16, Yaakov Selkowitz wrote:
> > > On 2017-07-26 03:08, Corinna Vinschen wrote:
> > > > On Jul 26 08:49, Thomas Wolff wrote:
> > > > > It would be good to keep wcwidth/wcswidth in sync with the installed
> > > > > Unicode data version (package unicode-ucd).
> > > > > Currently it seems to be hard-coded (in newlib/libc/string/wcwidth.c);
> > > > > it refers to Unicode 5.0 while installed Unicode data suggest 9.0 would
> > > > > be used.
> > > > > I can provide some scripts to generate the respective tables if desired.
> > > > > Thomas
> > > > If you can update the newlib files this way and send matching patches
> > > > to the newlib list, this would be highly appreciated.
> > > Thomas, I just updated unicode-ucd to 10.0 for this purpose.
> Thanks.
> > 
> > Oh, and, btw, the comment in wcwidth.c isn't quite correct.  The
> > cwstate in newlib is on Unicode 5.2, see newlib/libc/ctype/towupper.c.
> Oh, a number of other embedded tables. To make the tow* and isw* functions
> more easily adaptable to Unicode updates, there will be some revisions to do
> here. And the to* and is* ones (without 'w') even refer to locales in a way
> I do not understand. Maybe I'll restrict my effort to wcwidth first...

The to* and is* ones (without 'w') don't matter at all and you don't
have to touch them.

The Unicode stuff only affects the tow and isw functions.

As for how to fetch the data, you may want to have a look into
newlib/libc/ctype/utf8alpha.h and newlib/libc/ctype/utf8print.h.  The
header comments contain the awk scripts used to collect the data.

All other isw* files like iswblank.c contain comments explaining
what Unicode character categories are covered.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

Attachment: signature.asc
Description: PGP signature