[prev in list] [next in list] [prev in thread] [next in thread] 

List:       netbsd-tech-userlevel
Subject:    Re: Default rune widths for 8-bit characters
From:       Takehiko NOZAKI <th-nozaki () netwrk ! co ! jp>
Date:       2007-10-12 17:26:00
Message-ID: 87odf4dz2v.wl%th-nozaki () netwrk ! co ! jp
[Download RAW message or body]

hi, all.

>> I don't think this is correct. The default locale is effectively ASCII
>> and that covers only the first 128 chars.
>
> The default probably ought to be 8859-1

AFAIK,
	#include <locale.h>
	#include <langinfo.h>
	setlocale(LC_CTYPE, "C");
	printf("%s\n", nl_langinfo(CODESET));

may prints:

NetBSD/OpenBSD/Solaris	- 646(=ISO646)
glibc2(SuSE10)		- ANSI_X3.4-1968(=US-ASCII)
FreeBSD/DragonFlyBSD	- US-ASCII


> - or: do the changes only in a special runetable.c compiled into
>  the crunched sysinst (where we know the usage is ok)

i think this is reasonable fix (ugly but easy).

for the future, mininum encoding supports(propablly UTF-8)
should be added to libhack for i18n installer
(whole citrus locale is slight heavy for this purpose).

> > Isn't LC_CTYPE fine for static binaries as well? I think it is enough to
> > provide the correct locale file.
> 
> I copied them over to the ramdisk (after booting) and set LC_CTYPE, but it
> did not work.

it seems that src/distrib/utils/libhack/setlocale.c accepts
'C' locale only, and never read LC_CTYPE database.

very truly yours.
--
Takehiko NOZAKI <tnozaki@NetBSD.org>
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic