[32837] in Perl-Users-Digest
Perl-Users Digest, Issue: 4102 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Dec 27 09:09:30 2013
Date: Fri, 27 Dec 2013 06:09:02 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Fri, 27 Dec 2013 Volume: 11 Number: 4102
Today's topics:
Re: Question about language setting <rweikusat@mobileactivedefense.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 27 Dec 2013 13:58:43 +0000
From: Rainer Weikusat <rweikusat@mobileactivedefense.com>
Subject: Re: Question about language setting
Message-Id: <87mwjm4cq4.fsf@sable.mobileactivedefense.com>
"Dave Saville" <dave@invalid.invalid> writes:
> On Mon, 23 Dec 2013 23:14:54 UTC, "Peter J. Holzer"
> <hjp-usenet3@hjp.at> wrote:
>> On 2013-12-23 22:50, Rainer Weikusat <rweikusat@mobileactivedefense.com> wrote:
>> > "Peter J. Holzer" <hjp-usenet3@hjp.at> writes:
>> >> On 2013-12-23 15:39, Dave Saville <dave@invalid.invalid> wrote:
>> >>> He now says
>> >>>
>> >>><qoute>
>> >>> the perl problem seems to be solved: it's not a problem with
>> >>> installation or version. The problem is the setting for "LANG": It has
>> >>> to be LANG=en_US.UTF-8 and not LANG=de_DE_EURO which is the standard
>> >>> for german!
>> >>></quote>
>> >>>
[...]
>> > Considering the statement from 'the user', this must be something which
>> > causes the behaviour of some perl code to change because it is using a
>> > German locale. Considering what is in a locale definition, this makes
>> > LC_NUMERIC the most likely candidate,
[...]
>> Yes, I know. But I couldn't reproduce it. And that's not very
>> surprising: Many people use perl with a German locale, so it can't be
>> something generic like "perl doesn't work with a German locale" or "use
>> feature doesn't work with a German locale". It has to be something more
>> specific, like a bug in the locale implementation of the user's system
[...]
> A little difficult to post extra info from the user as I only have a
> jpeg of the errors rather than something I can cut and paste :-(
>
> The script starts:
>
> use strict;
> use warnings;
> use Carp:
> use Encode;
>
> Compilation failed in require at .... line 3 - ie the "use Carp" line.
>
> System is OS/2 his perl is 5.10.0. (Yes I know :-) )
>
> If you follow the links from the posted forum you end up with a C test
> program. I have built that on my system but as I am in the UK my
> system is defaulting to using a 'point' anyway. I have yet to persuade
> it to start up in a different locale.
According to some more searching around on the web, the OS/2 command to
set a locale is (example)
set lang=de_DE
[http://www.borgendale.com/locale.htm]
Results as to whether or not setlocale works on OS/2 are somewhat
unclear. Assuming your system starts with 'English' language settings,
you could use a modified test program,
-----------
#include <locale.h>
#include <stdio.h>
int main(void) {
printf("%f\n",2.5);
setlocale(LC_NUMERIC, "de_DE");
printf("%f\n",2.5);
setlocale(LC_NUMERIC, "C");
printf("%f\n",2.5);
return 0;
}
-----------
this should print (possibly with variations in the number of trailing
zeroes)
2.500000
2,500000
2.500000
If it doesn't, in particular, if there's a dot instead of a comma in the
second line, setlocale doesn't work as it is supposed to and if you
can't switch from English to German in this way, chances are very high
that switching from German to English also won't work.
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
Back issues are available via anonymous ftp from
ftp://cil-www.oce.orst.edu/pub/perl/old-digests.
#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V11 Issue 4102
***************************************