Bug#799050: Help needed with a locale-related issue
On 9/16/15, Francesco Poliwrote: > I see that the forwarded report has been closed. I have a doubt, > though: would the patch fix the issue when LANGUAGE='it' LC_CTYPE=C ? LC_CTYPE should not affect message language, it affects sorting order. So the issue you've found, while it looks similar, is a different one. > I mean: I also get a crash with > > $ LANGUAGE='it' LC_CTYPE=C locale > LANG=en_US.UTF-8 > LANGUAGE=it > LC_CTYPE=C > LC_NUMERIC="en_US.UTF-8" > LC_TIME="en_US.UTF-8" > LC_COLLATE="en_US.UTF-8" > LC_MONETARY="en_US.UTF-8" > LC_MESSAGES="en_US.UTF-8" > LC_PAPER="en_US.UTF-8" > LC_NAME="en_US.UTF-8" > LC_ADDRESS="en_US.UTF-8" > LC_TELEPHONE="en_US.UTF-8" > LC_MEASUREMENT="en_US.UTF-8" > LC_IDENTIFICATION="en_US.UTF-8" > LC_ALL= > $ LANGUAGE='it' LC_CTYPE=C apt-listbugs -v > /usr/lib/ruby/vendor_ruby/aptlistbugs/logic.rb:390:in `width': "\xC3" from > ASCII-8BIT to UTF-8 (Encoding::UndefinedConversionError) ... > But the patch seems to only take LC_ALL, LC_MESSAGES, and LANG into > account... it seems this particular issue needs additional care, maybe in ruby-gettext, because GNU gettext with similar variables returns: LANGUAGE='be_BY:be' LC_CTYPE='C' gettext 'celestia' "About Celestia" ??? Celestia while ruby-gettext: [3] pry(main)> str = gettext("About Celestia") => "\xD0\x9F\xD1\x80\xD0\xB0 Celestia" I have no idea how to fix it so far (just don't do that :) ).
Bug#799050: Help needed with a locale-related issue
On Wed, 16 Sep 2015 11:54:36 +0300 Hleb Valoshka wrote: [...] > it seems this particular issue needs additional care, maybe in > ruby-gettext, because GNU gettext with similar variables returns: > LANGUAGE='be_BY:be' LC_CTYPE='C' gettext 'celestia' "About Celestia" > ??? Celestia > while ruby-gettext: > [3] pry(main)> str = gettext("About Celestia") > => "\xD0\x9F\xD1\x80\xD0\xB0 Celestia" > > I have no idea how to fix it so far (just don't do that :) ). OK, thanks for all the help you're providing. It's really appreciated! For the record, I filed bug #799194. Bye. -- http://www.inventati.org/frx/ There's not a second to spare! To the laboratory! . Francesco Poli . GnuPG key fpr == CA01 1147 9CD2 EFDF FB82 3925 3E1C 27E1 1F69 BFFE pgpzVVN_ttXyp.pgp Description: PGP signature
Bug#799050: Help needed with a locale-related issue
On Tue, 15 Sep 2015 12:10:52 +0300 Hleb Valoshka wrote: > On 9/14/15, Francesco Poliwrote: > > > Hence, it seems to me that the trouble is not caused by the original > > string, but by those translated strings that include non-ASCII UTF-8 > > characters and are somehow sent as non-UTF-8 non-pure-ASCII strings, > > whenever LC_CTYPE=C ... > > Yes, 100% correct. And the the package to blame is the ruby-locale, > I've filed #799050. Thanks a lot for filing the bug report on the Debian BTS, for forwarding it upstream and for implementing a patch! I see that the forwarded report has been closed. I have a doubt, though: would the patch fix the issue when LANGUAGE='it' LC_CTYPE=C ? I mean: I also get a crash with $ LANGUAGE='it' LC_CTYPE=C locale LANG=en_US.UTF-8 LANGUAGE=it LC_CTYPE=C LC_NUMERIC="en_US.UTF-8" LC_TIME="en_US.UTF-8" LC_COLLATE="en_US.UTF-8" LC_MONETARY="en_US.UTF-8" LC_MESSAGES="en_US.UTF-8" LC_PAPER="en_US.UTF-8" LC_NAME="en_US.UTF-8" LC_ADDRESS="en_US.UTF-8" LC_TELEPHONE="en_US.UTF-8" LC_MEASUREMENT="en_US.UTF-8" LC_IDENTIFICATION="en_US.UTF-8" LC_ALL= $ LANGUAGE='it' LC_CTYPE=C apt-listbugs -v /usr/lib/ruby/vendor_ruby/aptlistbugs/logic.rb:390:in `width': "\xC3" from ASCII-8BIT to UTF-8 (Encoding::UndefinedConversionError) from /usr/lib/ruby/vendor_ruby/aptlistbugs/logic.rb:390:in `' from /usr/lib/ruby/vendor_ruby/aptlistbugs/logic.rb:387:in `' from /usr/lib/ruby/vendor_ruby/aptlistbugs/logic.rb:381:in `' from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require' from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require' from /usr/bin/apt-listbugs:349:in `' But the patch seems to only take LC_ALL, LC_MESSAGES, and LANG into account... -- http://www.inventati.org/frx/ There's not a second to spare! To the laboratory! . Francesco Poli . GnuPG key fpr == CA01 1147 9CD2 EFDF FB82 3925 3E1C 27E1 1F69 BFFE pgpQa4DlnSB9Q.pgp Description: PGP signature