Setting locales


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Setting locales
# 1  
Old 10-28-2012
Setting locales

I'm having a problem with my locale setting.

Quote:
-bash-3.2$ locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
Essentially, when using Xmgrace or Awk, all . are replaced with ,
leading to wrong arithmetic.



Here is an explanation of the problem:
awk printing thousands with commas. see LC_ALL=en_US.UTF-8
Quote:
LC_ALL=en_US.UTF-8
Causes the awk printf to output numbers values greater than 999 with commas when using ' in the format string.
Note: unset LC_ALL will not add commas!
How can I permanently set the locale to

LANG=en_US
?????
# 2  
Old 10-28-2012
Code:
# in your .profile or .bashrc
export LANG=something

where "something" is one of:
Code:
locale -a

The reason I used "something" is because different unixes may show slightly different locale names. Plus locales are installed by the admin, so I may only have a few, whereas you may have dozens.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Is there a difference between setting a user as nologin and setting it as a role?

Trying to figure out the best method of security for oracle user accounts. In Solaris 10 they are set as regular users but have nologin set forcing the dev's to login as themselves and then su to the oracle users. In Solaris11 we have the option of making it a role because RBAC is enabled but... (1 Reply)
Discussion started by: os2mac
1 Replies

2. Debian

Locales UTF8 - not working

Hello, I'm facing a strange problem in one of my Debian server, what is happening right now it that I have runned dpkg-reconfigure locales to set en_US UTF-8 so in that way I could use accentuation in my system. # locale -a C en_US.utf8 POSIX pt_BR.utf8 However, when I create a new... (12 Replies)
Discussion started by: pxb368@motorola
12 Replies

3. AIX

Locales and conversion tables confusion - Some characters don't get translated

Hello, my program running on AIX receives a message (from MQ) which is in CCSID 870 (LATIN-2 EBCDIC). It needs to convert it to CCSID 912 (ISO-8859-2). For this conversion, it uses the Websphere MQ functionality, but which, according to the manual, uses AIX's system conversion tables. (Btw - it... (1 Reply)
Discussion started by: Adamm
1 Replies

4. Web Development

Detecting browser locales/languages and generating output

We have a Java app that renders Localized text on user's browser session based upon browser language settings. The app reads the browser language settings and prepares the localized text. But recently we faced issues for Mozilla 5.0 version browser. Note our code works fine in IE. Taking an... (1 Reply)
Discussion started by: uunniixx
1 Replies

5. HP-UX

HPUX 10.20 - Warning! One or more of your selected locales are not available.

On our system a user successfully ran the only application on the system this morning. When they tried to login a bit later they could not. The Admin tried to reboot the server and it seemed to reboot ok. When logged in the admin tried to change directories and gets the below message (note they... (1 Reply)
Discussion started by: jmdzied
1 Replies

6. Red Hat

Displaying the available locales in english

Hi, I am developing a program that would ask the user to set the locale. For that, I need to display them to user in plain english. like English(US) English (Uk) depending on the user selection I need to set the locale. Is there a command in redhat linux that would... (1 Reply)
Discussion started by: eamani_sun
1 Replies

7. UNIX for Dummies Questions & Answers

formatting date for different locales

Hi, I need to know 1.the usage of LC_TIME with setlocale(). 2.the usage of getdate() utility I read that date formatting for different languages needs 1.user-supplied template file and 2.DATEMSK environment variable set to path of the template fie. Can anyone pls tell... (2 Replies)
Discussion started by: Aeon
2 Replies

8. AIX

Locales in AIX

Currently we have the following locales installed on two of our servers SERVER-1 $ locale -a C POSIX en_US en_US.8859-15 en_US.ISO8859-1 EN_US EN_US.UTF-8 ZH_CN ZH_CN.UTF-8 HI_IN HI_IN.UTF-8 ko_KR ko_KR.IBM-eucKR zh_TW zh_TW.IBM-eucTW SERVER-2 (0 Replies)
Discussion started by: voorkey
0 Replies

9. UNIX for Dummies Questions & Answers

New ip setting

I want to change the IPsetting and the broadcast setting. With ipconfig I get this: hme0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2 inet xx.17x.18x.xx netmask fffffff0 broadcast xx.17x.18x.xx ether yy:0:yy:b6:yy:xx What command(squence) do I use to... (6 Replies)
Discussion started by: kuultak
6 Replies

10. UNIX for Dummies Questions & Answers

Locales - Solaris 8

Can anyone tell me the difference between the 2 Locales: North American Partial Locales en_US.ISO8859-1 en_US.ISO8859-15 Does it matter which one to use? What are the differences? Thanks. -I have found the below info but I don't know what it means(Also no RFC# for 8859-15): ... (2 Replies)
Discussion started by: finster
2 Replies
Login or Register to Ask a Question