This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: iswxxxxx/towxxxer and Unicode


Ulrich Drepper writes:

> > U0000 is has a very particular meaning: it says "the C string ends
> > here". This makes it a control character.
> 
> No.  This means NUL must not be passed to any of these functions.

The SUSV2 clearly says the contrary. It contains language sufficient
to conclude that 0x0000 is a valid character and therefore is suitable
as an argument to iswcntrl:

- Description of iswcntrl: "In all cases wc is a wint_t, the value of
  which must be a wide-character code corresponding to a valid character
  in the current locale or must equal the value of the macro WEOF."

- In xbd/charset.html:
  - About the portable character set: "A null character, NUL, which
    has all bits set to zero, will be in the set of characters."
  - About wide characters: "The wide-character value for each member
    of the Portable Character Set will equal its value when used as
    the lone character in an integer character constant. Wide-character
    codes for other characters are locale- and implementation-dependent."

Bruno

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]