[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

to_s and locales in Gtk

Michael Neumann

11/11/2003 12:43:00 PM

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

2 Answers

matz

11/11/2003 1:15:00 PM

0

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.

Michael Neumann

11/11/2003 2:50:00 PM

0

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.

Thanks! That works for running the Gtk test runner.

Regards,

Michael