Add (#ifdef'ed by STARTUP_LOCALE) following line to crt0.c
authorAndrey Chernov <ache@FreeBSD.org>
Sun, 12 Jun 1994 10:51:01 +0000 (10:51 +0000)
committerAndrey Chernov <ache@FreeBSD.org>
Sun, 12 Jun 1994 10:51:01 +0000 (10:51 +0000)
commit0a10912751a64d3bdcf8eb11631f919f01e09355
treed90e1483849cd40f32019f103170686ec840e607
parent78571de57dea9679ccb832ec282c5bd403a30840
Add (#ifdef'ed by STARTUP_LOCALE) following line to crt0.c

(void) setlocale(LC_ALL, "");

It will be easiest way now to make national chars available
for all ctype-oriented programs at once by simple

setenv LANG Your_National_Charset
(currently only Russian.koi8-r available)

Default case (without "LANG" environment
variable) will be fully ANSI compatible (got "C" locale).

If "LANG" variable present, extention becomes active.

Effect of this extention is great: in one time all ctype
oriented programs can accept/print national characters
without any touching source/binary code, it is big win, IMHO.

This method is fully compatible with ISO8859-* and russian koi8-r
too (in general -- with all 8-bit character sets). I think
it is very useful.
I got this idea from Xenix locale implementation.

This extention is even never compiled in, unless you set
setenv STARTUP_LOCALE
before rebuilding crt0.c
lib/csu.i386/Makefile
lib/csu.i386/crt0.c