Extended ascii


 
Thread Tools Search this Thread
Top Forums Programming Extended ascii
# 1  
Old 08-29-2004
Extended ascii

Hi all,


I would like to change the extended ascii code ( 128 - 255).

I tried to change LC_ALL and LANG in current session ( values from locale -a) and for no good.


Thanks.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Print byte position of extended ascii character

Hello, I am on AIX. When I encounter extended ascii characters and special characters on a file I need to print.. Byte position, actual character and line number. Is there a simple command that can give me the above result ? Thanks in advance (38 Replies)
Discussion started by: rosebud123
38 Replies

2. Shell Programming and Scripting

Extended ASCII Characters keep on getting reintroduced to text files

I am working with a log file that I am trying to clean up by removing non-English ASCII characters. I am using Bash via Cygwin on Windows. Before I start I set: export LC_ALL=C I clean it up by removing all non-English ASCII characters with the following command; grep -v $''... (4 Replies)
Discussion started by: lewk
4 Replies

3. Shell Programming and Scripting

Removal Extended ASCII using awk

Hi All, I am trying to remove (SELECTIVE - passed as argument) Extended ASCII using Awk based on adhoc basis. Can you please let me know how to do it. I have to implement this using awk only. Thanks & Regads (14 Replies)
Discussion started by: tostay2003
14 Replies

4. Programming

How to read extended ASCII characters from stdin?

Hi, I want to read extended ASCII characters from keyboard using c language on unix/linux. How to read extended characters from keyboard or by copy-paste in terminal irrespective of locale set in the system. I want to read the input characters from keyboard, store it in an array or some local... (3 Replies)
Discussion started by: sanzee007
3 Replies

5. Shell Programming and Scripting

Search and Replace Extended Ascii Characters

We are getting extended Ascii characters in the input file and my requirement is to search and replace them with a space. I am using the following command LANG=C sed -e 's// /g' It is doing a good job, but in some cases it is replacing the extended characters with two spaces. So my input... (12 Replies)
Discussion started by: ysvsr1
12 Replies

6. Shell Programming and Scripting

Identify extended ascii characters in a file

Hi, Is there a way to identify the lines in a file having extended ascii characters and display the same? For instance I have a file abc.txt having below data aaa|bbb|111|This is first line aaa|bbb|222|This is secõnd line aaa|bbb|333|This is third line aaa|bbb|444|This is foùrth line... (3 Replies)
Discussion started by: decci_7
3 Replies

7. AIX

Printing extended ASCII

Hi All, I'm trying to send extended ascii characters to my HP2055 as part of PCL printer control codes. What I want to do is select a bar code font, print the bar code and reset the printer to the default font. Selecting the bar code font works good. Printing the bar code goes almost ok too. ... (5 Replies)
Discussion started by: petervg
5 Replies

8. Shell Programming and Scripting

convert ascii values into ascii characters

Hi gurus, I have a file in unix with ascii values. I need to convert all the ascii values in the file to ascii characters. File contains nearly 20000 records with ascii values. (10 Replies)
Discussion started by: sandeeppvk
10 Replies

9. UNIX for Advanced & Expert Users

Processing extended ascii character file names in UNIX (BASH scipts)

Hi, I have a accentuated letter (ö) in a script for an Installer. It's a file name. This is not working and I'm told to try using the octal value for the extended ascii character. Does anyone no how to do this? If I had the word "filförval", can I just put in the value between the letters, like... (9 Replies)
Discussion started by: peli
9 Replies

10. Shell Programming and Scripting

extended ascii problem

hi i would like to check text files if they contain extended ascii characters within or not. i really dont have any idea how to start your kind help would be very much appreciated thanks. (7 Replies)
Discussion started by: smooth
7 Replies
Login or Register to Ask a Question
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)