Sponsored Content
Top Forums Programming How to make gl_get_line read unicode characters Post 302483509 by fpmurphy on Monday 27th of December 2010 11:38:55 AM
Old 12-27-2010
Does your program include
Code:
setlocale(LC_CTYPE, "");

and is your locale correctly set?

See tecla(5) – User interface provided by the tecla library for how to enter what Sun calls international characters.

Last edited by fpmurphy; 12-27-2010 at 12:44 PM..
 

10 More Discussions You Might Find Interesting

1. Programming

How to make static unicode string?

In Windows, wchar_t *pStr = L"Hello"; works, but I can't find the equivalent to Unix system. How can I make static stack-memory-based wide character string in C in Unix? (1 Reply)
Discussion started by: sledge76
1 Replies

2. Programming

How to display unicode characters / unicode string

I have a stream of characters like "\u8BBE\u5907\u7BA1" and i want to display it. I tried following things already without any luck. 1) printf("%s",L("\u8BBE\u5907\u7BA1")); 2) printf("%lc",0x8BBE); 3) setlocale followed by fwide followed by wprintf 4) also changed the local manually... (3 Replies)
Discussion started by: jackdorso
3 Replies

3. AIX

problem with Unicode characters insertion

hi, I have a problem with unicode chars ( chinese, japanese etc ) insertion using sqlplus prompt. When i wrote a proc program for it i am able to create records. But when i fore the same query on sql prompt it stores reverse ????? ..some junk. widechar columns are mapped with NVARCHAR datatype.... (0 Replies)
Discussion started by: suman_jakkula
0 Replies

4. UNIX for Advanced & Expert Users

how to make root user read all

I want to know what i can set up so that root user can read everything. On my Solaris systems root can read the following directory. drwxrwx--- 408 icsrc icarc0 36864 Aug 21 07:24 dev drwxrwsr-x 7 icsrc icarc0 4096 Aug 4 1998 test But on my linux systems it gets: # cd dev bash: cd:... (4 Replies)
Discussion started by: frankkahle
4 Replies

5. Shell Programming and Scripting

Help replacing or scrubbing unicode characters

I have a csv (tab delimited) file that is created by an application (that I didn't write). Every so often it throw out a <U+FEFF> (Zero Width no break space) character at the begining of a tabbed field. The charcater is invisible to some editors, but it shows up bolded in less. The issue is... (3 Replies)
Discussion started by: roninuta
3 Replies

6. UNIX for Dummies Questions & Answers

remove special and unicode characters

Hi, How do I remove the lines where special characters or Unicode characters appear? The following query does work but I wonder if there is a better way. cat test.txt | egrep -v '\)|#|,|&|-|\(|\\|\/|\.' The following lines show that my query is incomplete. Warning: The word "*Khan" is... (1 Reply)
Discussion started by: shantanuo
1 Replies

7. Shell Programming and Scripting

Trim leading zeros to make field 6 characters long

Hi all- I've got a file that will have multiple columns. In one column there will be a string that is 10 digits in length, but I need to trim the first four zeros to make it 6 characters? example: 0000001234 0000123456 0000234566 0000000321 output: 001234 123456 234566 000321 (5 Replies)
Discussion started by: Cailet
5 Replies

8. Shell Programming and Scripting

Read Embedded Newline characters with read (builtin) in KSH93

Hi Guys, Happy New Year to you all! I have a requirement to read an embedded new-line using KSH's read builtin. Here is what I am trying to do: run_sql "select guestid, address, email from guest" | while read id addr email do ## Biz logic goes here done I can take care of any... (6 Replies)
Discussion started by: a_programmer
6 Replies

9. Shell Programming and Scripting

Perl script backspace not working for Unicode characters

Hello, My Perl script reads input from stdin and prints it out to stdout. After I read input I use BACKSPACE to erase characters. However BACKSPACE does not work with Unicode characters that are multi-bytes. On screen the character is erased but underneath only one byte is deleted instead of all... (3 Replies)
Discussion started by: tdw
3 Replies

10. Shell Programming and Scripting

Display unicode characters in zos shell

Hi all, I have a shell script that has several strings with \uxxxx characters distributed within. I would like to display these characters when I execute the script and echo the strings. I am running on zos in an sh environment. Some strings look like this: "Chcete-li pou\u017e\u00edt" <---... (1 Reply)
Discussion started by: adam.wis
1 Replies
PS(1)								     wordtrans								     PS(1)

NOMBRE
wordtrans - Multi Language Word Translator SYNOPSIS
wordtrans [-v] [--help] [--dicts] [--desc] [-d alias] [+w] [-w] [+c] [-c] [+i] [-i] [+g] [-g] [--info-server] [--info-dict] [--html] [--html-base page] [--html-link-options options] [--conf dir] [--show-charsets] [--charset codec] [--utf8] [--debug] [-l w_lang1 w_lang2] word COMMAND-LINE OPTIONS -v Display the version number. --help Shows a helping message. --debug Shows debugging messages. --dicts Displays all available dictionaries. The info will be quite similar to this: Available dictionaries: ALIAS w c i g FILE d2e + - - - /usr/share/wordtrans/de-es.dict de-en + + + - /usr/share/trans/de-en i2e + - - - /usr/share/i2e/i2e.dict babylon = = = = /usr/share/wordtrans/Engtospa.dic (babylon) hebreo = = = = /mnt/usr/usr/share/wordtrans/Engtoheb.dic (babylon) dict = = = = * (dict) wordnet = = = = wn (dict) The alias will be used to select a dictionary with option -d. File shows the main dictionary. There are four columns showing the default options, in other words, if below w is the + symbol this means that option +w is the default option. If instead there were a - then the default option would be -w. Idem with +c/-c, +i/-i and +g/-g. -d alias Selects the dictionary to use. alias must be one of the shown with option --dicts. It's very important that this option will be the first, because when loading a dictionary its default options will be loaded too. If this option is not used wordtrans will automatically select the default dictionary (the one which is in ~/.wordtrans/preferencias). If the default dictionary couldn't be selected then the first dictionary found will be used. If there's none, wordtrans will exit with an error message. +w Only full words will be searched. If you look for "casa" only the terms which contain the full word casa will be shown but not the ones which contain casarse or escasamente. -w This is the opposite option of +w. +c Case sensitive. -c Not case sensitive. +i Display second language first. -i The opposite of previous option. +g Ignore accented vowels. -g Doesn't ignore accented vowels. --charset codec This specifies the charset that will be used for displaying the messages. By default, it will use an appropriate charset for your locale. You can see all avaiable charsets by using the option --show-charsets. --utf8 The same as --charset UTF-8. --show-charsets Shows all available charsets (which depends on the Qt version you're using). -l word_language1 word_language2 Append a new entry in the selected dictionary composed of the words indicated and exits. If any word has blanks then the word should be between quotation marks. You must introduce the word in the proper order. If the dictionary is English-Spanish then the first word should be the English one followed by the Spanish one. The new translations will be saved in the personal dictionary. word Word or regular expression to look for in the selected dictionary. If the expression contains blanks then it should be between quotation marks. A list will appear with the terms found. New options have been added to be used mainly by the web interface: --desc Shows the description of the selected dictionary (in html). --info-server Shows info of the dict server (only if the selected dictionary is of this kind). Generally it will give you info of the dictionaries available in that server. --info-dict Ask info to the dict server over the selected dictionary. --html Returns a text in HTML format instead of plain text. --html-base page Sets the base page of the web interface. --html-link-options Sets additional options for generated links. --conf dir Directory with the configuration files. This is used in the web interface to read the configuration files from the directory /etc/wordtrans, so wordtrans can be executed as the user nobody. EXAMPLES
wordtrans -d i2e +w -c +i casa The word casa will be searched in the dictionary i2e (English- Spanish), with no case sensitive option, displaying in first place the Spanish words. This is the output: From i2e: lejos de casa --> afield casa vendida por pisos --> condominium casa de huespedes --> guesthouse hacia casa --> homeward casa --> house casa --> household ama de casa --> housekeeper gobierno de la casa --> housekeeping ama de casa --> housewife casa del guarda --> lodge retrete fuera de la casa --> outhouse casa de empenos --> pawnshop wordtrans -d i2e -w +i tecla This will search for the terms which contain the string tecla in the English-Spanish dictionary: From i2e: tecla bloqueo de mayusculas --> caps lock key pulsar (la tecla del raton para marcar) --> click (to -) teclado desmontable --> detachable keyboard tecla de flecha hacia abajo --> down arrow key tecla de funcion --> function key tecla de inicio --> home key disposicion del teclado --> keyboard layout teclado numerico --> keypad teclado numerico --> numeric keyboard tecla bloqueo de desplazamiento de pantalla --> scroll lock key tecla de mayusculas --> shift key tecla de funcion programable --> soft key tecla programable --> soft key tecla de flecha arriba --> up arrow key teclado --> keyboard wordtrans +w -i car This will search in the default dictionary (in this case i2e) the word car, displaying first the English words: From i2e: car --> automovil car --> coche car window --> ventanilla wordtrans -d de-en hello Look for hello in the German-English dictionary: From de-en: hello --> Hallo!, Guten Tag! to say hello (to someone) --> (jemandem) guten Tag sagen wordtrans --debug -d i2e -l fox zorro Tries to append to the English-Spanish dictionary the entry "fox : zorro" (but in this case it fails): Debug: fox - zorro are already in the dictionary Error: can not add new entry to dictionary AUTHOR
Multi Language Word Translator Copyright (C) 2000-2002 Ricardo Villalba <rvm@escomposlinux.org>, under the GPL license. You can download new releases of wordtrans from http://wordtrans.sourceforge.net/ wordtrans February 7, 2001 PS(1)
All times are GMT -4. The time now is 12:34 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy