Sponsored Content
Operating Systems Solaris help me to change the character set Post 302344984 by hosney00ux on Tuesday 18th of August 2009 06:40:19 AM
Old 08-18-2009
hi jim mcnamara
thanks alot for your time helping me
1- LC_TIME i change this variable and every thing working good
2- for your explain locale variable
 

10 More Discussions You Might Find Interesting

1. Email Antispam Techniques and Email Filtering

Stopping Language Character Set Spam

I have noticed a significate decrease in spam by prodmail filtering on the language character sets that I don't read. Nothing against our fine friends in Japan, China, Korea and all over the world who use different languages, but I now find that over 50% of my mountains of spam daily is... (1 Reply)
Discussion started by: Neo
1 Replies

2. Solaris

latin 2 character-set with xterm

Hi, We have problems with the latin 2 Character-set with xterm. We have installed SunRay-Server with Solaris 8. Our Thinclients use hu- and cz-keyboards. I have set the right local-settings and xmodemaps. If I use the dtterm all is running fine. As soon as I use the xterm, it cannot display... (0 Replies)
Discussion started by: paho
0 Replies

3. Programming

character set solaris

hi , i am trying to work on a script that transforms some special Dutch characters and send them to a Xerox printer .. the problem is that while doing so iam unable to identify th correct character set that is used by solaris , to transfer these characcters to Xerox character set . thanks... (2 Replies)
Discussion started by: ppass
2 Replies

4. UNIX for Advanced & Expert Users

iconv -l and ANSEL character set

I am forced to use the ANSEL character set for some GEDCOM documents but must convert them to a more modern set for another app which doesn't recognize ANSEL. I am unable to locate an ISO code for ANSEL in a search of the web. Would someone plese identify the ANSEL character set from the list given... (4 Replies)
Discussion started by: Whiterock
4 Replies

5. Programming

character set conversion in unix C

Hi, Could anybody explain how to change the character set of a particular string in C in unix. we are using HP-UX as OS. We require to change the input string which is in cp1250 format to utf-8. A sample code would help. Thnx in advance (1 Reply)
Discussion started by: gucho
1 Replies

6. Shell Programming and Scripting

Unix character set problem

Hi All, We are getting file into our unix box with multibyte characters. When we tried to view the file the record looks like this Frédéric Actually the data sent to us is Frédéric --> my locale charmap of unix is set to UTF8 only ... but still i am getting this problem. I... (6 Replies)
Discussion started by: sandeeppvk
6 Replies

7. UNIX for Advanced & Expert Users

ASCII Character Set

I thought I would point this out. This has a lot of the non printing characters. ASCII Character Set (7 Replies)
Discussion started by: cokedude
7 Replies

8. UNIX for Dummies Questions & Answers

Character set problem

Hi, I'm trying to edit a file with vi, but all special characters (áéíóú etc) don't seem to show correctly. They don't seem to be supported by the OS (SunOS 5.10). I'm using MobaXterm as the terminal emulator, which is configured to use ISO-8859-1. The same charset is used on Solaris. If I open... (4 Replies)
Discussion started by: Subbeh
4 Replies

9. Shell Programming and Scripting

How to set character limit on READ?

Hello, I created the following (snippet from larger code): echo -n "A1: " read A1 VERIFY=$(echo -n $A1|wc -c) if ; then echo -e "TOO MANY CHARACTERS" fi echo -n "A2: " read A2 echo -n "A3: " read A3 echo -e "Concat: $B1/$B2/$B3" Basically what it does is it... (4 Replies)
Discussion started by: jl487
4 Replies

10. UNIX for Advanced & Expert Users

Russian character set issue.

Hi All, I'm facing issue while opening xls file while contains Russian/Siberian character I tried various options which I could get from google but still issue persists hence thought of taking help here, We are trying to export data from Oracle via shell script using sqlplus utility. After... (8 Replies)
Discussion started by: arvindshukla81
8 Replies
setlocale(3C)						   Standard C Library Functions 					     setlocale(3C)

NAME
setlocale - modify and query a program's locale SYNOPSIS
#include <locale.h> char *setlocale(int category, const char *locale); DESCRIPTION
The setlocale() function selects the appropriate piece of the program's locale as specified by the category and locale arguments. The cate- gory argument may have the following values: LC_CTYPE, LC_NUMERIC, LC_TIME, LC_COLLATE, LC_MONETARY, LC_MESSAGES, and LC_ALL. These names are defined in the <locale.h> header. The LC_ALL variable names all of a program's locale categories. The LC_CTYPE variable affects the behavior of character handling functions such as isdigit(3C) and tolower(3C), and multibyte character functions such as mbtowc(3C) and wctomb(3C). The LC_NUMERIC variable affects the decimal point character and thousands separator character for the formatted input/output functions and string conversion functions. The LC_TIME variable affects the date and time format as delivered by ascftime(3C), cftime(3C), getdate(3C), strftime(3C), and strp- time(3C). The LC_COLLATE variable affects the sort order produced by collating functions such as strcoll(3C) and strxfrm(3C). The LC_MONETARY variable affects the monetary formatted information returned by localeconv(3C). The LC_MESSAGES variable affects the behavior of messaging functions such as dgettext(3C), gettext(3C), and gettxt(3C). A value of "C" for locale specifies the traditional UNIX system behavior. At program startup, the equivalent of setlocale(LC_ALL, "C") is executed. This has the effect of initializing each category to the locale described by the environment "C". A value of "" for locale specifies that the locale should be taken from environment variables. The order in which the environment variables are checked for the various categories is given below: +---------------+----------------+----------------+---------------+ | Category | 1st Env Var | 2nd Env Var | 3rd Env Var | +---------------+----------------+----------------+---------------+ |LC_CTYPE: | LC_ALL | LC_CTYPE |LANG | +---------------+----------------+----------------+---------------+ |LC_COLLATE: | LC_ALL | LC_COLLATE |LANG | +---------------+----------------+----------------+---------------+ |LC_TIME: | LC_ALL | LC_TIME |LANG | +---------------+----------------+----------------+---------------+ |LC_NUMERIC: | LC_ALL | LC_NUMERIC |LANG | +---------------+----------------+----------------+---------------+ |LC_MONETARY: | LC_ALL | LC_MONETARY |LANG | +---------------+----------------+----------------+---------------+ |LC_MESSAGES: | LC_ALL | LC_MESSAGES |LANG | +---------------+----------------+----------------+---------------+ If a pointer to a string is given for locale, setlocale() attempts to set the locale for the given category to locale. If setlocale() suc- ceeds, locale is returned. If setlocale() fails, a null pointer is returned and the program's locale is not changed. For category LC_ALL, the behavior is slightly different. If a pointer to a string is given for locale and LC_ALL is given for category, setlocale() attempts to set the locale for all the categories to locale. The locale may be a simple locale, consisting of a single locale, or a composite locale. If the locales for all the categories are the same after all the attempted locale changes, setlocale() will return a pointer to the common simple locale. If there is a mixture of locales among the categories, setlocale() will return a composite locale. RETURN VALUES
Upon successful completion, setlocale() returns the string associated with the specified category for the new locale. Otherwise, setlo- cale() returns a null pointer and the program's locale is not changed. A null pointer for locale causes setlocale() to return a pointer to the string associated with the category for the program's current locale. The program's locale is not changed. The string returned by setlocale() is such that a subsequent call with that string and its associated category will restore that part of the program's locale. The string returned must not be modified by the program, but may be overwritten by a subsequent call to setlocale(). ERRORS
No errors are defined. FILES
/usr/lib/locale/locale locale database directory for locale ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |CSI |Enabled | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe with exceptions | +-----------------------------+-----------------------------+ SEE ALSO
locale(1), ctype(3C), getdate(3C) gettext(3C), gettxt(3C), isdigit(3C), libc(3LIB), localeconv(3C), mbtowc(3C), strcoll(3C), strftime(3C), strptime(3C) strxfrm(3C) tolower(3C), wctomb(3C), attributes(5), environ(5), locale(5), standards(5) NOTES
It is unsafe for any thread to change locale (by calling setlocale() with a non-null locale argument) in a multithreaded application while any other thread in the application is using any locale-sensitive routine. To change locale in a multithreaded application, setlocale() should be called prior to using any locale-sensitive routine. Using setlocale() to query the current locale is safe and can be used any- where in a multithreaded application except when some other thread is changing locale. It is the user's responsibility to ensure that mixed locale categories are compatible. For example, setting LC_CTYPE=C and LC_TIME=ja (where ja indicates Japanese) will not work, because Japanese time cannot be represented in the "C" locale's ASCII codeset. SunOS 5.11 19 Sep 2005 setlocale(3C)
All times are GMT -4. The time now is 11:39 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy