Re: bin/60496: Locale-dependent UTF-8 issue over SSH session
"Valery Ushakov via gnats" <[email protected]> Sat, 25 Jul 2026 22:35:03 +0000 (UTC)
| Newsgroups | gmane.os.netbsd.bugs |
|---|---|
| Message-ID | <[email protected]> |
The following reply was made to PR bin/60496; it has been noted by GNATS. From: Valery Ushakov <[email protected]> To: [email protected] Cc: Subject: Re: bin/60496: Locale-dependent UTF-8 issue over SSH session Date: Sun, 26 Jul 2026 01:33:52 +0300 On Fri, Jul 24, 2026 at 15:10:00 +0000, [email protected] via gnats wrote: > The separator should be a space in Norwegian locale (nb_NO.UTF-8). > Instead, it sends �. > > $ LC_ALL=nb_NO.UTF-8 printf "%'d\n" 12345 | hexdump > 0000000 3231 33c2 3534 000a > 0000007 It sends 0xc2 byte, which makes an invalid UTF-8 sequence. The locale source (share/locale/numeric/nb_NO.UTF-8.src in this case) has \ua0 non-breaking space (as UTF-8 \xc2\xa0) The bug is that thousands_sep in vfwprintf.c is char, not a string, hence truncated 0xc2. -uwe