From p.dalgaard@biostat.ku.dk  Thu Nov 27 11:05:50 1997
From: p.dalgaard@biostat.ku.dk (Peter Dalgaard BSA)
Date: 27 Nov 1997 12:05:50 +0100
Subject: R-alpha:  Latin-1 characters / Locale etc.
In-Reply-To: Martin Maechler's message of Thu, 27 Nov 1997 10:35:06 +0100
References: <199711270935.KAA03092@sophie.ethz.ch>
Message-ID: <x27m9uwq9d.fsf@blueberry.kubism.ku.dk>

Martin Maechler <maechler@stat.math.ethz.ch> writes:

>=20
> >>>>> "PD" =3D=3D Peter Dalgaard BSA <p.dalgaard@biostat.ku.dk> writes=
:

> Hmm, so we would follow the Unix locale philosophy.
> I could live with it.
>=20
> It has however, a distinct drawback:
>=20
> You can write R code which works with R compiled in one environment bu=
t
> fails with --identical R source code-- compiled in a different environ=
ment.

Actually, it's a run-time not compile-time issue.

> While this is true for things like 'readline' and 'proc.time / system.=
time',
> I don't like it so much for such a basic things as symbol characters.

Yes, it's no good having library code that only works in some locales.
However, it should be fairly easy to enforce (in some sense) a
requirement that everything on CRAN should work with LANG=3DC (unless,
of course it *is* language-specific code).

> BTW, Peter D., do you have a (electronical form of a) document availab=
le
> which nicely explains the  locale stuff (for a user, not a C-programme=
r ..).
>  Kurt/Fritz/???: I think there are some nice pages available in Linux.=
something=20

Argh. Stop tickling my guilty conscience. I've been promising to do a
write-up of that for the Danish-Howto for months. Trouble is, I tend
to forget how to do it myself... So right now, the two main machines
that I use are not set up right (running a straigh RedHat 4.2),
whereas my old 486 does have the stuff in place.=20

> I'm still wondering:
> The  only locale thing we have is (the environment variable)
>=20
> =09LC_CTYPE=3Diso_8859_1
>=20
> But then I wonder why I saw the difference between  =E4 and =FC=20
> that I reported ....

Hmm, that *is* strange... Try a variant of

unsigned char c =3D 0;
char *p;
main()
{
        while(++c)
                if ( isalpha(c) ) putchar(c);
        putchar('\n');
}

--=20
   O__  ---- Peter Dalgaard             Blegdamsvej 3 =20
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N  =20
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)             FAX: (+45) 35327907

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


R-alpha: Latin-1 characters / Locale etc.
Peter Dalgaard BSA