NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: bin/60496: Locale-dependent UTF-8 issue over SSH session
The following reply was made to PR bin/60496; it has been noted by GNATS.
From: Valery Ushakov <uwe%stderr.spb.ru@localhost>
To: gnats-bugs%netbsd.org@localhost
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, dreibh%simula.no@localhost 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
Home |
Main Index |
Thread Index |
Old Index