libstdc++: Add "ASCII" as an alias for std::text_encoding::id::ASCII
commit358fd42aabec56e471ed3c8e6f3dccbc305ff6f7
authorJonathan Wakely <jwakely@redhat.com>
Tue, 23 Jan 2024 14:57:15 +0000 (23 14:57 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Wed, 31 Jan 2024 09:42:38 +0000 (31 09:42 +0000)
tree0490ee568f23de8b45d53d3f1ade42746c29e184
parent00b2d7d17c38bdf3d26786c7030dc47454678c44
libstdc++: Add "ASCII" as an alias for std::text_encoding::id::ASCII

As noted in LWG 4043, "ASCII" is not an alias for any known registered
character encoding, so std::text_encoding("ASCII").mib() == id::other.
Add the alias "ASCII" to the implementation-defined superset of aliases
for that encoding.

libstdc++-v3/ChangeLog:

* include/bits/text_encoding-data.h: Regenerate.
* scripts/gen_text_encoding_data.py: Add extra_aliases dict
containing "ASCII".
* testsuite/std/text_encoding/cons.cc: Check "ascii" is known.

Co-authored-by: Ewan Higgs <ewan.higgs@gmail.com>
Signed-off-by: Ewan Higgs <ewan.higgs@gmail.com>
libstdc++-v3/include/bits/text_encoding-data.h
libstdc++-v3/scripts/gen_text_encoding_data.py
libstdc++-v3/testsuite/std/text_encoding/cons.cc