to_s and locales in Gtk

Ask a Question related to Ruby, Design and Development.

  1. #1

    Default 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

    Michael Neumann Guest

  2. Similar Questions and Discussions

    1. Overloading to_s in a class of my own
      I'm confused by a problem I'm having trying to overload the to_s operator so that my class will be accepted as a string where applicable. Here's a...
    2. Any portable ways to get a list of valid locales?
      I think the question I want to ask here is: "Is there any portable way of getting a listing of valid locales on the current system?" I've been...
    3. sorting issue when using locales
      Hi all, ever used Ruby to sort arrays of strings which contain ISO-8859-1 encoded "umlaut" characters as is typical for German text? Recently I...
    4. Problem with class, struct, and to_s
      On Saturday, July 26, 2003, 2:54:28 AM, ts wrote: G>> irb(main):009:1> def to_s G>> irb(main):010:2> -15 G>> irb(main):011:2> end ...
    5. Array and Hash to_s
      On Saturday, July 19, 2003, at 12:56 PM, Yukihiro Matsumoto wrote: While we're on the subject of "to_s" and similar friends, I have a question...
  3. #2

    Default Re: to_s and locales in Gtk

    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.

    Yukihiro Matsumoto Guest

  4. #3

    Default Re: to_s and locales in Gtk

    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

    Michael Neumann Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139