From: наб <nabijaczleweli@nabijaczleweli.xyz>
To: Bruno Haible <bruno@clisp.org>
Cc: libc-alpha@sourceware.org
Subject: Re: [PATCH v16] POSIX locale covers every byte [BZ# 29511]
Date: Thu, 13 Jul 2023 01:51:47 +0200 [thread overview]
Message-ID: <yw3qu72ff5qsihs5qfwetlxplt2qmgaldp4vdfkleg7slgec7v@5z3mlumr2gfj> (raw)
In-Reply-To: <6497083.JsnAkG3lO3@nimes>
[-- Attachment #1: Type: text/plain, Size: 2465 bytes --]
On Wed, Jul 12, 2023 at 11:49:59PM +0200, Bruno Haible wrote:
> Some more comments:
> * The encoding name "POSIX" is available as nl_langinfo (CODESET). Many
> applications pass this encoding name to iconv(1) or iconv_open(3);
> this is the main purpose of knowing the locale's encoding, after all.
>
> But if musl libc, or any other libc (Solaris or whatever), does the
> same thing, but with a different mapping table than glibc has,
> iconv implementations have a problem, because the name "POSIX" then
> has different mapping tables on different systems.
Implementation survey via
#include <langinfo.h>
#include <stdio.h>
int main(){
puts(nl_langinfo (CODESET));
}
and my original test program from https://bugs.debian.org/1017852 says:
musl: "ASCII" (7f: 1, 007f 80: 1, df80 ff: 1, dfff)
NetBSD 9.3: "646" (7f: 1, 007f 80: 1, 0080 ff: 1, 00ff)
tribblix m25: ‒ || ‒ (this is the "solaris or whatever")
FreeBSD 13.0: "US-ASCII" (7f: 1, 007f 80: 1, 0080 ff: 1, 00ff)
OpenBSD 7.2: ‒ || ‒
MacOS: ‒ || ‒ (uname says 19.6.0)
(notably, all of these are, strictly, wrong, but).
None of these implementations' iconvs have a POSIX/posix encoding, either;
I'm like mostly-sure this is just historical behaviour on the historical systems.
> Suggestion: Change the encoding name from "POSIX" to "POSIX-GNU" or
> something similar, to make it possible for iconv implementations to
> support it in a future-proof way.
Given the above, I don't think there's much value to making the encoding
name weirder and longer, since the dust has long settled on this?
> * The identifier __gconv_btwoc_posix looks misspelled.
> Suggestion: s/__gconv_btwoc_posix/__gconv_btowc_posix/
> (The previous one, __gconv_btwoc_ascii, is misspelled as well.)
This explains why I didn't understand what it was trying to say lol;
applied, and propagated to __gconv_btwoc_ascii.
> * iconv/gconv_int.h: In the comment
> identity-mapping bytes [0, 0x7F], and moving [0x80, 0xFF] into the end
> of the Low Surrogate Area at [U+DC80, U+DCFF]. */
> it's no longer the end of the Low Surrogate Area [U+DC00, U+DFFF].
>
> Suggestion: Change the comment to
> identity-mapping bytes [0, 0x7F], and mapping [0x80, 0xFF] into the
> Low Surrogate Area at [U+DC80, U+DCFF]. */
Applied.
Will resend rebased for monday.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2023-07-12 23:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-12 21:49 Bruno Haible
2023-07-12 23:51 ` наб [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-07-12 19:44 Bruno Haible
2023-07-12 20:22 ` наб
2023-07-12 21:08 ` Bruno Haible
2023-07-03 15:39 наб
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=yw3qu72ff5qsihs5qfwetlxplt2qmgaldp4vdfkleg7slgec7v@5z3mlumr2gfj \
--to=nabijaczleweli@nabijaczleweli.xyz \
--cc=bruno@clisp.org \
--cc=libc-alpha@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).