Sponsored Content
Operating Systems Solaris how do I change locale settings? Post 90993 by m223464 on Tuesday 29th of November 2005 11:58:52 AM
Old 11-29-2005
how do I change locale settings?

I support a product which writes to log files and it's currently formatting the date in US format. I've established this is due to these settings:

account1# locale -k d_fmt t_fmt
d_fmt="%m/%d/%y"
t_fmt="%H:%M:%S"

If I log on with a different account the settings are different:

account2# locale -k d_fmt t_fmt
d_fmt="%d/%m/%y"
t_fmt="%r"

Does anyone know where these setting are defined?

I don't know if it's relevant but the LC_ variables exist for both accounts are the same:

account1$ set
LC_COLLATE=en_GB.ISO8859-1
LC_CTYPE=en_GB.ISO8859-1
LC_MESSAGES=C
LC_MONETARY=en_GB.ISO8859-1
LC_NUMERIC=en_GB.ISO8859-1
LC_TIME=en_GB.ISO8859-1

account2$ set
LC_COLLATE=en_GB.ISO8859-1
LC_CTYPE=en_GB.ISO8859-1
LC_MESSAGES=C
LC_MONETARY=en_GB.ISO8859-1
LC_NUMERIC=en_GB.ISO8859-1
LC_TIME=en_GB.ISO8859-1

Gareth
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to change locale ?

Hi, I have Solaris 7 installed. When I give the command 'locale' from the box, I am getting all the environment variables as 'de' ! I want it to be in English. How do I change the locale ?? TIA, Srinivas. (1 Reply)
Discussion started by: snsrini
1 Replies

2. UNIX for Dummies Questions & Answers

How to change root's .profile settings

As a regular (non-root) user on Unix servers I'm accustomed to changing my .profile file to set paths that I frequently use, etc. I am trying to learn unix and set up a test server running SunOS 5.8. When I login as root I don't see a .profile file that belongs to root wherein I could change the... (1 Reply)
Discussion started by: FredSmith
1 Replies

3. HP-UX

command to change duplex settings..

Hi Folks, I want the command to change the duplex settings of a HP-UX server. Thanks in advance. Sagar. (2 Replies)
Discussion started by: sag71155
2 Replies

4. Red Hat

Locale settings and awk

Hi, We are trying a few things on our new RHEL machine and I noticed some strange behaviours happening in awk. We are using the swedish locale sv_SE.iso88591, where you have three additional letters in the alphabet: ... X Z Å Ä Ö (in that order). I can sort text files following the above... (0 Replies)
Discussion started by: Indalecio
0 Replies

5. Solaris

change default Locale

i have a new solaris 10 enviroment and when i create new users and when i go to login using the default .profile and run locale i get the following LANG= LC_CTYPE=en_IE.ISO8859-15 LC_NUMERIC=en_IE.ISO8859-15 LC_TIME=en_IE.ISO8859-15 LC_COLLATE=en_IE.ISO8859-15... (2 Replies)
Discussion started by: dshakey
2 Replies

6. Solaris

Putty : Change default settings (solved)

Hi, I use to work on solaris via putty and always on session start - i use to increase the font to 14 bold - capture session output to a file my requirement) to make these changes permanent, so that i need not to change the settings everytime i connect via putty please advice. ... (0 Replies)
Discussion started by: saurabh84g
0 Replies

7. AIX

Settings change in aix

Hi Can any one tell the procedure to change the maxpout and minpout settings on AIX (1 Reply)
Discussion started by: newtoaixos
1 Replies

8. Red Hat

Change user settings..

Hi, I have 48 cores in my server. I want to assign 50% of the cores to certain programs and rest to some other programms. I found the command "taskset" very good option to assign cpu afinity to already running programms or newly created programms. But the problem is even if i set a cron to... (1 Reply)
Discussion started by: Rantu
1 Replies

9. UNIX for Dummies Questions & Answers

Change default settings of nslookup

how and where can i change permanent the settings of nslookup? each time i change it by doing nslookup set timeout=2 the nslookup , does not save the settings , how can i do it in permanent way? (2 Replies)
Discussion started by: prpkrk
2 Replies

10. Shell Programming and Scripting

[All variants] Change settings

Hi, I have a big settings confg (file attached). There are a few separate tasks that I have to accomplish. All scripting/programming languages are appreciated. 1. I need to parse all values and output to stdout. Sample output (truncated): VALUEA 2017-01-01 Lores ipsum Lorem ipsum dolor sit... (11 Replies)
Discussion started by: useretail
11 Replies
locale(1)						      General Commands Manual							 locale(1)

NAME
locale - Displays information about locales SYNOPSIS
locale [-a | -m] locale [-c] [-k] name... STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: locale: XCU5.0 Refer to the standards(5) reference page for more information about industry standards and associated tags. OPTIONS
Writes information about all available public locales. Writes the names of the specified locale categories. Writes the names and values of specified locale keywords. Writes the names of all character map (charmap) files that are available for specification to the -f option of the localedef command. OPERANDS
Specifies one or more of the following: A locale category, such as LC_TIME A keyword, such as am_pm in a locale category The reserved word charmap, which requests the name of the character map file used to produce the current locale Different types of names can be intermixed in any order. However, if a single name represents both a locale category name and a key- word name in the current locale, results are undefined. DESCRIPTION
The locale command without any options or arguments writes to standard output the names and values of all the current locale environment variables, such as LANG and LC_COLLATE. The locale command with the -a or -m options displays information about available locales and character maps on your system. If the -a option is specified, locale writes the names of all available public locales. These are locales that are available to any application. If the -m option is specified, locale writes a list of the names of all available character-mapping files. These values are suitable variable values for the -f option with the localedef command. The locale command with the name operand displays information about locale categories and keywords in the current locale. For example, the command could display information about the decimal_point keyword in the LC_NUMERIC category or information about all keywords in the LC_NUMERIC category. The name operand can be either a locale category, a keyword from a category, or the keyword charmap. The following table shows how the -c and -k options determine the level of information displayed by the locale command with respect to locale keywords: Options Set Information Written to Standard Output None Value of keyword specified by the name operand or values of all keywords in the category specified by the name operand. -c Name of category containing the keyword specified by the name operand or the name of the category specified by the name operand, followed by values of locale keywords. -k Names and values of locale keywords. -ck Name of category, followed by names and values of locale keywords. Following are the locale categories and the locale keywords that you can use in the name operand. Note that there are no keywords that you can specify in the locale command for the LC_COLLATE and LC_CTYPE categories; the XCU specification allows vendors to determine whether the locale command displays values for keywords in these two categories. Locale Category Locale Keywords LC_COLLATE None. LC_CTYPE None. CHARMAP charmap code_set_name mb_cur_max mb_cur_min LC_MESSAGES yesexpr noexpr yesstr nostr LC_MONETARY int_curr_symbol currency_symbol mon_decimal_point mon_grouping mon_thousands_sep positive_sign negative_sign int_frac_digits frac_digits p_cs_precedes p_sep_by_space n_cs_precedes n_sep_by_space p_sign_posn n_sign_posn debit_sign credit_sign left_parenthesis right_parenthesis LC_NUMERIC decimal_point thousands_sep grouping LC_TIME abday abmon alt_digits am_pm d_fmt d_t_fmt day era era_d_fmt era_d_t_fmt era_t_fmt era_year mon t_fmt t_fmt_ampm EXIT STATUS
Success. An error occurred. ERRORS
[Tru64 UNIX] To review locale diagnostic messages, enter the following command: % dspcat /usr/lib/nls/msg/en_US.ISO8859-1/locale.cat | more EXAMPLES
Assume that the LANG environment variable is set to fr_FR.ISO8859-1 and the LC_MONETARY environment variable to fr_CA.ISO8859-1. The fol- lowing example shows the results when you enter the locale command without options: % locale LANG=fr_FR.ISO8859-1 LC_COL- LATE="fr_FR.ISO8859-1" LC_CTYPE="fr_FR.ISO8859-1" LC_MONETARY="fr_CA.ISO8859-1" LC_NUMERIC="fr_FR.ISO8859-1" LC_TIME="fr_FR.ISO8859-1" LC_MESSAGES="fr_FR.ISO8859-1" LC_ALL= The LC_ALL variable, if set, overrides the values of other variables. For example, if LC_ALL is set to en_US.ISO8859-1, the setting implies LC_COLLATE=en_US.ISO8859-1, even if the LC_COLLATE environment variable is set to another locale. The following commands show two ways to retrieve the value of the decimal_point delimiter for the current locale: % locale -ck decimal_point LC_NUMERIC decimal_point="." % locale decimal_point . In the following example, the locale command retrieves any keywords defined in the CHARMAP, LC_CTYPE, and LC_COLLATE categories of the POSIX (C) locale: % locale -ck CHARMAP LC_CTYPE LC_COLLATE CHARMAP charmap="ISO8859-1" code_set_name="ISO8859-1" mb_cur_max=1 mb_cur_min=1 LC_COLLATE LC_CTYPE alnum=0x0002 alpha=0x0001 blank=0x0004 cntrl=0x0008 digit=0x0010 graph=0x0020 lower=0x0040 print=0x0080 punct=0x0100 space=0x0200 upper=0x0400 xdigit=0x0800 The following example shows a possible application of the locale and printf commands in a script to determine whether a user response is affirma- tive: if printf "%s " "$response" | grep -Eq "'locale yesexpr'" then <insert processing for affirmative response> else <insert processing for response other than affirmative> fi ENVIRONMENT VARIABLES
The following environment variables affect the behavior of the locale command: Provides a default value for the locale category variables that are not set or null. If set, overrides the values of all locale variables, including LANG. Determines the locale for the interpreta- tion of byte sequences as characters (single-byte or multibyte) in input operands and files. Determines the locale used to find the mes- sage catalog for diagnostic messages and other text displayed by the command. Determines the location of message catalogs for processing of LC_MESSAGES. SEE ALSO
Commands: localedef(1), printf(1) Functions: setlocale(3) Files: locale(4) Others: i18n_intro(5), l10n_intro(5), standards(5) Writing Software for the International Market locale(1)
All times are GMT -4. The time now is 09:38 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy