1851718 Members
1847 Online
104062 Solutions
New Discussion

Re: Reg. Decimal Symobal

 
Kennedy_1
Occasional Contributor

Reg. Decimal Symobal

Hi I need to change the decimal symobol fromat from .(DOT) to .(COMMA) to do some testing. Can somebody help me with this.

What Ive done so far:
Ive set the LC_TIME to GB
Now I need to change the Decimal Symbol format from (DOT) to (COMMA)and Back
4 REPLIES 4
Cheryl Griffin
Honored Contributor

Re: Reg. Decimal Symobal

Have you tried setting:
LC_NUMERIC=C
"Downtime is a Crime."
Kenneth Platz
Esteemed Contributor

Re: Reg. Decimal Symobal

Kennedy,

The decimal character (along with the thousands separator, grouping, and alternate digits) is set by the LC_NUMERIC environment variable. In order to check the current setting for the decimal character, you can run the command:

locale -ck decimal_point

If you are currently in the "C", "POSIX", or other US-English locales, you will get something along the lines of:

$ locale -ck decimal_point
LC_NUMERIC
decimal_point="."

On the other hand, if you set your LC_NUMERIC field to fr_FR.iso88591, you will get output similar to the following:

$ LC_NUMERIC=fr_FR.iso88591 locale -ck decimal_point
LC_NUMERIC
decimal_point=","

More information can be found in the man pages for locale(1) and localedef(4).

I think, therefore I am... I think!
Kennedy_1
Occasional Contributor

Re: Reg. Decimal Symobal

I tried changing to LC_NUMERIC=fr_FR.iso88591
but stil for $locale -ck decimal_point
Im getting (.) Dot

How do I change it to comma.

An early Reply will be highly appreciated

Kennedy
Mark Fenton
Esteemed Contributor

Re: Reg. Decimal Symobal

you need to export the change:

# export LC_NUMERIC=fr_FR.iso88591

then when you check:

# locale -ck decimal_point
LC_NUMERIC
decimal_point=","

hth
Mark