To_s and locales in Gtk

Hi,

Using the Gtk test-runner some very strange errors happened during
running the xmlrpc4r tests.

Indeed, xmlrpc4r and Gtk does not work together, as Gtk localizes the
output of the #to_s method, which results in my case that 3.4.to_s gives
"3,4" instead of the “3.4” I expected.

So my question: Should I use #to_str in my xmlrpc4r library to convert
floats into strings (this works!)? Or is this a bug or misfeature of
Gtk?

Regards,

Michael

Hi,

···

In message “to_s and locales in Gtk” on 03/11/11, Michael Neumann mneumann@ntecs.de writes:

Using the Gtk test-runner some very strange errors happened during
running the xmlrpc4r tests.

Indeed, xmlrpc4r and Gtk does not work together, as Gtk localizes the
output of the #to_s method, which results in my case that 3.4.to_s gives
“3,4” instead of the “3.4” I expected.

Situation might change when you set LC_NUMERIC environment variable to
“C”. I really really hate “.” and “,” decimal point confusion.

						matz.

Thanks! That works for running the Gtk test runner.

Regards,

Michael

···

On Tue, Nov 11, 2003 at 10:14:43PM +0900, Yukihiro Matsumoto wrote:

Hi,

In message “to_s and locales in Gtk” > on 03/11/11, Michael Neumann mneumann@ntecs.de writes:

Using the Gtk test-runner some very strange errors happened during
running the xmlrpc4r tests.

Indeed, xmlrpc4r and Gtk does not work together, as Gtk localizes the
output of the #to_s method, which results in my case that 3.4.to_s gives
“3,4” instead of the “3.4” I expected.

Situation might change when you set LC_NUMERIC environment variable to
“C”. I really really hate “.” and “,” decimal point confusion.