Re: [PATCH] scanf.3: Do not mention the ERANGE error

Alejandro Colomar
2022-12-14T11:23:21Z

[-- Attachment #1.1: Type: text/plain, Size: 1420 bytes --]

On 12/14/22 11:52, Ian Abbott wrote:
>>>
>>> '@' isn't included in C's basic character set though.  '&' is available.
>>
>> Just a curious question from an ignorant:  what's the difference between the
>> basic character set and the source character set?
>
> The source character set may contain locale-specific characters outside the
> basic source character set.
>
> Actually, there are two basic character sets - the basic source character set
> and the basic execution character set (which includes the basic source character
> set plus a few control characters).  The source character set and/or execution
> character set may contain locale-specific, extended characters outside the basic
> character set.
>
> https://port70.net/~nsz/c/c11/n1570.html#5.2.1

I still have a small doubt. C23 added '@' to the source character set, but
seems to be a second-class citizen:

The execution character set may also contain multibyte characters, which
need not have the same encoding as for the source character set. For both
character sets, the following
shall hold:
— The basic character set, @, $, and ` shall be present and each character shall
be encoded as a
single byte.

What's the difference, and why isn't it part of the basic character set? Maybe
because not all keyboards have those three characters?
>

--
<http://www.alejandro-colomar.es/>

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]