public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: Steven J Abner <pheonix.sja@att.net>
To: newlib@sourceware.org
Subject: Re: wctomb() accepts out-of-range character in C-locale
Date: Tue, 26 Mar 2024 07:48:18 -0400	[thread overview]
Message-ID: <I4EYAS.838M1KYPJZJ7@att.net> (raw)
In-Reply-To: <IBDYAS.IT0GDL3WNBOQ@att.net>



> On Tue, Mar 26 2024 at 01:43:57 AM +0000, Jun. T 
> <takimoto-j@kba.biglobe.ne.jp> wrote:
>> I think POSIX doesn't say anything about the 8bit part of
>> the C-locale; it just says it can be implementation dependent.
>> 
>> It is newlib that choses the implementation in which chars
>> in 0x80-0xff in C-locale correspond to those chars with
>> the same wide-char values (virtually equivalent to latin1).
>> 
>> Other system may chose other implementation, I think.
> 
The 'C' locale of old did have only 128 codes. These codes represented 
the
referred to 'portable character set', which you refer to as ascii. Then
POSIX redefined the 'C' locale and I quote:
"Conforming systems shall provide a POSIX locale, also known as the C 
locale.".
POSIX also states that these codes: "The POSIX locale shall contain 256 
single-byte
characters including the characters in Portable Character Set and 
Non-Portable Control Characters".
The character codes 0x80-0xFF are not really implementation defined. 
They are classified
as 'cntl' codes, thou not officially stated, and valid codes. This 
makes POSIX locale
as portable as the old 'C' locale.
The 'implementation' defined you seem to be referring to is the 
defining of
character map encodings for other locales. Then 0x80-0xFF take on 
meanings other
then the 'C', POSIX locale, but are still defined by a standard listed 
by IANA of
defined character maps.




  parent reply	other threads:[~2024-03-26 11:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-25  7:45 Jun T
2024-03-25 10:32 ` Corinna Vinschen
2024-03-25 11:26   ` Bruno Haible
2024-03-25 11:34     ` Corinna Vinschen
2024-03-25 14:07     ` Jun. T
2024-03-25 20:18       ` brian.inglis
2024-03-26  1:43         ` Jun. T
     [not found]           ` <IBDYAS.IT0GDL3WNBOQ@att.net>
2024-03-26 11:48             ` Steven J Abner [this message]
2024-03-27  8:01               ` Jun. T

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=I4EYAS.838M1KYPJZJ7@att.net \
    --to=pheonix.sja@att.net \
    --cc=newlib@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).