# Numeric locale

**URL:** <https://www.ruby-forum.com/t/numeric-locale/105904>\
**Category:** Ruby\
**Created:** [June 4, 2007, 2:45pm UTC](https://www.ruby-forum.com/t/numeric-locale/105904 "2007-06-04T14:45:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bertram\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/54ee81/32.png) [@Bertram\_S](https://www.ruby-forum.com/u/Bertram_S)\
**Post date:** [June 4, 2007, 2:45pm UTC](https://www.ruby-forum.com/t/numeric-locale/105904/1 "2007-06-04T14:45:35Z")

</div>

Hi,

the German decimal separator is “,”. So pi will be  
represented by “3,1415” rather than “3.1415”. As far as I  
know this behaviour is controlled by the LC\_NUMERIC  
environment variable.

Now, I notice the following on my system: When I’m in editor  
Vim I may say in command mode:

:ruby puts 4.56  
:!ruby -e ‘puts 4.56’

The former is the built-in ruby interface, the latter a call  
to a child process and will show thats standard output.

But I happen to encounter two different results. The  
built-in version gives “4,56”; the child process prints  
“4.56”.

How can I make the normal Ruby process print a comma, too?

Thanks in advance

Bertram

---

<div class="post-metadata">

**Author:** ![Bertram\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/54ee81/32.png) [@Bertram\_S](https://www.ruby-forum.com/u/Bertram_S)\
**Post date:** [June 4, 2007, 4:49pm UTC](https://www.ruby-forum.com/t/numeric-locale/105904/2 "2007-06-04T16:49:54Z")

</div>

Hi,

In message “Re: Numeric locale”  
on Mon, 4 Jun 2007 21:39:26 +0900, Bertram S.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) writes:

|How can I make the normal Ruby process print a comma, too?

I’m sorry but LC\_NUMERIC is disabled at the current level of  
implementation, since it causes more headache than merit, e.g. causing  
marshal incompatibility, syntax error, etc. We will support it in the  
future. But not in specific near future.

```
          matz.

```

---

<div class="post-metadata">

**Author:** ![Bertram\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/54ee81/32.png) [@Bertram\_S](https://www.ruby-forum.com/u/Bertram_S)\
**Post date:** [June 4, 2007, 6:07pm UTC](https://www.ruby-forum.com/t/numeric-locale/105904/3 "2007-06-04T18:07:03Z")

</div>

Hi,

Am Montag, 04. Jun 2007, 23:48:25 +0900 schrieb Yukihiro M.:

> In message “Re: Numeric locale”  
> on Mon, 4 Jun 2007 21:39:26 +0900, Bertram S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) writes:
> 
> |How can I make the normal Ruby process print a comma, too?
> 
> I’m sorry but LC\_NUMERIC is disabled at the current level of  
> implementation, since it causes more headache than merit,  
> […]

Then the Vim behaviour probably is the bug. Thanks anyway;  
now I know about it.

Bertram
