https://bugzilla.gnome.org/show_bug.cgi?id=704000
gnome-perl | Gtk2 | unspecified
Summary: Gtk2 -init brokes perl internal locale handling
Classification: Bindings
Product: gnome-perl
Version: unspecified
OS/Version: Linux
Status: UNCONFIRMED
Severity: major
Priority: Normal
Component: Gtk2
AssignedTo: gtk...@li...
ReportedBy: do...@uh...
QAContact: gtk...@li...
GNOME version: ---
Preamble: Hungarian locale uses a comma instead of a decimal point in
fractional numbers.
The two oneliner examples below show the bug:
doome@freedom:~$ LC_ALL=hu_HU.utf8 perl -e 'print 3.123."\n";'
3.123
doome@freedom:~$ LC_ALL=hu_HU.utf8 perl -e 'use Gtk2 -init; print 3.123."\n";'
3,123
Somehow using Gtk2 -init; mangles (localizes) how Perl fetches a number from
the memory, thus all modules trying to access a number got it converted to the
locale, even if it shouldn't have.
Using pack shows the problem, too, so hopefully it is not in printing or some
weird IO Layer of Perl:
doome@freedom:~$ LC_ALL=hu_HU.utf8 perl -e 'use Gtk2 -init; print unpack("H*",
3.123)."\n";'
332c313233
doome@freedom:~$ LC_ALL=hu_HU.utf8 perl -e 'print unpack("H*", 3.123)."\n";'
332e313233
This shows the problem lies somewhere deep, because even pack show difference:
2c (an ASCII comma) with Gtk2 -init, and 2e (an ASCII period) without it, so
internal stringifying goes wrong..
Tried it on a system with perl-gtk2 1.247, Gtk 2.24 and Perl 5.16, and another
one with perl-gtk2 1.220, Gtk2 2.18.9, Perl 5.10.1, both were affected.
--
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
|