Your message dated Tue, 02 Nov 2010 09:17:42 +0000
with message-id <[email protected]>
and subject line Bug#379329: fixed in perl 5.10.1-16
has caused the Debian Bug report #379329,
regarding perl-base: setlocale() does not work as documented
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
379329: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=379329
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: perl-base
Version: 5.8.8-4
Severity: normal
Tags: l10n

I am trying to write a locale aware program. As I understand the
perl documentation (mainly the man page perllocale) perl is currently
dealing only with output (I will discuss this man page in a different
wishlist bug later). So I attempt to construct an input routine.

The following programm, which is taken almost verbatim from the man
page, does not work as advertised, i.e. setlocale() seems to return
"C", regardless of the actual locale settings.

he...@remaxp:~/prog/db/rechnung$ less locale_info.pl
#!/usr/bin/perl

use POSIX qw(locale_h);

# Get a reference to a hash of locale-dependent info
$locale_values = localeconv();

# Output sorted list of the values
for (sort keys %$locale_values) {
        printf "%-20s = %s\n", $_, $locale_values->{$_}
}

# query and save the old locale
$old_locale = setlocale(LC_NUMERIC);
print "LC_NUMERIC: $old_locale\n";

No look at the follwing output:
he...@remaxp:~/prog/db/rechnung$ bash
he...@remaxp:~/prog/db/rechnung$ export LANG=de_DE
he...@remaxp:~/prog/db/rechnung$ export LC_ALL=de_DE
he...@remaxp:~/prog/db/rechnung$ export LC_NUMERIC=de_DE
he...@remaxp:~/prog/db/rechnung$ ./locale_info.pl
currency_symbol      = EUR
decimal_point        = .
frac_digits          = 2
int_curr_symbol      = EUR
int_frac_digits      = 2
mon_decimal_point    = ,
mon_grouping         =
mon_thousands_sep    = .
n_cs_precedes        = 0
n_sep_by_space       = 1
n_sign_posn          = 1
negative_sign        = -
p_cs_precedes        = 0
p_sep_by_space       = 1
p_sign_posn          = 1
LC_NUMERIC: C
~~~~~~~~~~~~~
If I use LC_CTYPE instead of LC_NUMERIC, it *does* work. (Note, that
decimal_point is incorrectly set to "." instead of "," - I reported
this against locales in #379329, but I tend to believe this to be a
perl problem in reality).

Next I take another example from perllocale(1):
he...@remaxp:~/prog/db/rechnung$ cat lcnumeric.pl
#!/usr/bin/perl

use POSIX qw(strtod);
use locale;

$n = 5/2;   # Assign numeric 2.5 to $n

$a = " $n"; # Locale-dependent conversion to string

print "half five is $n\n";       # Locale-dependent output

printf "half five is %g\n", $n;  # Locale-dependent output

print "DECIMAL POINT IS COMMA\n"
    if $n == (strtod("2,5"))[0]; # Locale-dependent conversion

and run it as well:
he...@remaxp:~/prog/db/rechnung$ ./lcnumeric.pl
half five is 2.5
half five is 2.5
DECIMAL POINT IS COMMA

Now this programm still prints "2.5" (not 2,5 as proper) but *claims*
that the decimal point is in fact a comma???

Unfortunately I have no idea how to debug this, I simply wanted to use
the facilities provided by perl :-((

-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (500, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.14.6-grsec-cz03
Locale: lang=de...@euro, lc_ctype=de...@euro (charmap=ISO-8859-15)

Versions of packages perl-base depends on:
ii  libc6                         2.3.6-15   GNU C Library: Shared libraries

perl-base recommends no packages.

-- no debconf information
-- 
      Dr. Helge Kreutzmann                     [email protected]
           Dipl.-Phys.                   http://www.helgefjell.de/debian.php
        64bit GNU powered                     gpg signed mail preferred
           Help keep free software "libre": http://www.ffii.de/

Attachment: signature.asc
Description: Digital signature


--- End Message ---
--- Begin Message ---
Source: perl
Source-Version: 5.10.1-16

We believe that the bug you reported is fixed in the latest version of
perl, which is due to be installed in the Debian FTP archive:

libcgi-fast-perl_5.10.1-16_all.deb
  to main/p/perl/libcgi-fast-perl_5.10.1-16_all.deb
libperl-dev_5.10.1-16_amd64.deb
  to main/p/perl/libperl-dev_5.10.1-16_amd64.deb
libperl5.10_5.10.1-16_amd64.deb
  to main/p/perl/libperl5.10_5.10.1-16_amd64.deb
perl-base_5.10.1-16_amd64.deb
  to main/p/perl/perl-base_5.10.1-16_amd64.deb
perl-debug_5.10.1-16_amd64.deb
  to main/p/perl/perl-debug_5.10.1-16_amd64.deb
perl-doc_5.10.1-16_all.deb
  to main/p/perl/perl-doc_5.10.1-16_all.deb
perl-modules_5.10.1-16_all.deb
  to main/p/perl/perl-modules_5.10.1-16_all.deb
perl-suid_5.10.1-16_amd64.deb
  to main/p/perl/perl-suid_5.10.1-16_amd64.deb
perl_5.10.1-16.debian.tar.gz
  to main/p/perl/perl_5.10.1-16.debian.tar.gz
perl_5.10.1-16.dsc
  to main/p/perl/perl_5.10.1-16.dsc
perl_5.10.1-16_amd64.deb
  to main/p/perl/perl_5.10.1-16_amd64.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Niko Tyni <[email protected]> (supplier of updated perl package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Tue, 02 Nov 2010 10:17:28 +0200
Source: perl
Binary: perl-base libcgi-fast-perl perl-doc perl-modules perl-debug perl-suid 
libperl5.10 libperl-dev perl
Architecture: source all amd64
Version: 5.10.1-16
Distribution: unstable
Urgency: low
Maintainer: Niko Tyni <[email protected]>
Changed-By: Niko Tyni <[email protected]>
Description: 
 libcgi-fast-perl - CGI::Fast Perl module
 libperl-dev - Perl library: development files
 libperl5.10 - shared Perl library
 perl       - Larry Wall's Practical Extraction and Report Language
 perl-base  - minimal Perl system
 perl-debug - debug-enabled Perl interpreter
 perl-doc   - Perl documentation
 perl-modules - Core Perl modules
 perl-suid  - runs setuid Perl scripts
Closes: 379329 596105 601549
Changes: 
 perl (5.10.1-16) unstable; urgency=low
 .
   * Improve LC_NUMERIC documentation. (Closes: #379329)
   * Fix sprintf not to ignore LC_NUMERIC with constants. (Closes: #601549)
   * Fix stack pointer corruption in pp_concat() with "use encoding".
     (Closes: #596105)
Checksums-Sha1: 
 9f47374c10097e80004d5f5960af6bcb76b65570 1388 perl_5.10.1-16.dsc
 8bb47b6f2c657acf33331bdc7edf72148432f580 113563 perl_5.10.1-16.debian.tar.gz
 29ef22a6a34f3e4591257f03e0fa90bd8bdfc864 53064 
libcgi-fast-perl_5.10.1-16_all.deb
 3fb1890f8c214decb66c997e517f913161bf3c82 7188478 perl-doc_5.10.1-16_all.deb
 84c9fc1f57f5116efa77d3801bf94c86f926b1aa 3481344 perl-modules_5.10.1-16_all.deb
 6cdf53b95de74d2c2b11708d9818157884edf6b3 1065864 perl-base_5.10.1-16_amd64.deb
 5a2cd52b2a18d1d1ff41db95fdabfb7633fe7145 5835708 perl-debug_5.10.1-16_amd64.deb
 b6080890ac102b9e265678925485e55269f7711f 34914 perl-suid_5.10.1-16_amd64.deb
 2ed2dd5ebb9b185d3665c8ebddf3398d2281d5ca 1150 libperl5.10_5.10.1-16_amd64.deb
 049e3625aa42501c6df2d052565cca74edcfc4ef 2562396 
libperl-dev_5.10.1-16_amd64.deb
 f5b4cab1ed4fdd10b7eb5e348291467c7ab6b292 4461128 perl_5.10.1-16_amd64.deb
Checksums-Sha256: 
 f503c0af0eed86278d130a8aa7c51a4a27936eb24a6e8819f70fdecf11c07a71 1388 
perl_5.10.1-16.dsc
 f23c65e0cf8b68127e82c4f8dba72182f6928f57e154c6599f44588653e30ce4 113563 
perl_5.10.1-16.debian.tar.gz
 e16bf2e08bab8dc0122ce2cdec3c69bc5e9ed41b64c94b33b6d02253907e09e3 53064 
libcgi-fast-perl_5.10.1-16_all.deb
 6af18cd4a81ff1e57a65685742b4192af5f7223da8ae45bd1d25e5abb794854a 7188478 
perl-doc_5.10.1-16_all.deb
 1302936c55e3d73d067915fa08047ed4b5345ec185ede8eb579497120d6af1e1 3481344 
perl-modules_5.10.1-16_all.deb
 29b8e501e28245b152a4af2b72533a01ffded06d194d60d240b4d2b64951877d 1065864 
perl-base_5.10.1-16_amd64.deb
 ccda23c96f33f1e03d23d01b2d4e5c8ccf60fdcc2d5c6f95ee5fc5ddd9cb4800 5835708 
perl-debug_5.10.1-16_amd64.deb
 cc97cab2fcc28f9cb0b7620049b191fdd842067c67e54aa06ab7eb33de276f36 34914 
perl-suid_5.10.1-16_amd64.deb
 618404b8cec50afce67a0923045539d89c89d1d65a1ccfeaff3ff8d2dfd3527f 1150 
libperl5.10_5.10.1-16_amd64.deb
 e71c1d087adfdbb6e15e0b09546587306030dba0ec50d422a138735dd37928e8 2562396 
libperl-dev_5.10.1-16_amd64.deb
 bb6ef32d9504f6fb4434abc5ffcc1f894bd6243d89b72030736706197f5a1163 4461128 
perl_5.10.1-16_amd64.deb
Files: 
 af2d8b82e85ba6c842f0ec241171371c 1388 perl standard perl_5.10.1-16.dsc
 fb243330d424fb664fb860cabfe32314 113563 perl standard 
perl_5.10.1-16.debian.tar.gz
 894e6601916d64612625f94e185d1572 53064 perl optional 
libcgi-fast-perl_5.10.1-16_all.deb
 1d5382304f59e40b15c33be752520d48 7188478 doc optional 
perl-doc_5.10.1-16_all.deb
 3a3ece864c516d54fb70bfecc70c3f1d 3481344 perl standard 
perl-modules_5.10.1-16_all.deb
 2c931bea5396ac573646d1f8c74d6f8f 1065864 perl required 
perl-base_5.10.1-16_amd64.deb
 4b488c17ec80362a0063f4efa9998348 5835708 debug extra 
perl-debug_5.10.1-16_amd64.deb
 ddfed28dacb5c5332954d5b42cd0ba13 34914 perl optional 
perl-suid_5.10.1-16_amd64.deb
 a982ea6bbeaf9336036516d5f06dbf77 1150 libs optional 
libperl5.10_5.10.1-16_amd64.deb
 83a0e9c6e315a8a2cc620c503e9d406d 2562396 libdevel optional 
libperl-dev_5.10.1-16_amd64.deb
 72d23b4e1a39aa46296e606fe74090d9 4461128 perl standard perl_5.10.1-16_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAkzP0bwACgkQiyizGWoHLTkt1wCgmaNEYKReq8rYeMe6d7pt/sDX
HugAn3CxLaE589HCjmUSCedTmkAf8D5c
=9oyy
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to