Sponsored Content
Top Forums Shell Programming and Scripting Perl script backspace not working for Unicode characters Post 302500855 by tdw on Tuesday 1st of March 2011 07:30:50 PM
Old 03-01-2011
Thank you very much for the pointers. I followed tips from 2nd link and added the line in my script:

system('stty iutf8');

It worked but not completely. Normal width characters worked fine, like אזחט. But wide characters like Chinese, one BACKSPACE erased all bytes correctly (3 bytes per char), but cursor moved back only one term cell instead of two cells for wide chars. The result was that some Chinese characters were still left visible on terminal even after all of the underlying bytes were deleted.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Backspace Not Working in Script

Hello, I've written a Perl script that prompts for asnwers to questons. At those prompts, the backspace key shows up as ^H^H. I would like the users to have the ablility to use the backspace key. I'm running bash shell and don't otherwise have this problem. Any help would be greatly... (4 Replies)
Discussion started by: Atama
4 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. 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

5. 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

6. Programming

How to make gl_get_line read unicode characters

Hi, My program uses gl_get_line from libtecla to get user input from terminal. It works fine as long as I enter English at the terminal prompt. However, if I enter other languages, such as Chinese characters, either by typing in or cut-and-paste, the input characters get cleared from terminal... (5 Replies)
Discussion started by: tdw
5 Replies

7. Shell Programming and Scripting

stty erase ^h not working for backspace

Hi , I have to press shift + Backspace to do backspace on my unix termminal everytime. How can i configure it to a normal backspace only. Please help me here. PFB the contents of the stty -a : dbtgr@hpxi017:/pocuser/C5/aimsys/dbtgr> stty -a speed 38400 baud; line = 0; rows = 35; columns =... (4 Replies)
Discussion started by: kunwar
4 Replies

8. Solaris

[SOLVED] Backspace not working!!!!!

Hi friends, Hope u r doing well. It is a very strange problem that I've never faced when I used linux or freebsd. When a type a command in Solaris 10, and if I make a mistake, the backspace doesn't work, when I press the backspace key three times forexample, this is what I get, ^H ^H ^H. The same... (2 Replies)
Discussion started by: gabam
2 Replies

9. Shell Programming and Scripting

Remove ^? characters in shell variables on using backspace

Friends, I observed a peculiar problem in shell. if I set a variable using standard input and backspace was used by the user, then the variable get ^? characters embedded in the variable. ### echo "Enter value for X=" read X echo $X expr $X + 1 ### If the variable is echoed, then there... (3 Replies)
Discussion started by: sachinverma
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
ttty(7) 						 Miscellaneous Information Manual						   ttty(7)

NAME
ttty - Thai terminal driver SYNOPSIS
#include <sys/aioctl.h> DESCRIPTION
This section describes special features supported by the Thai terminal driver, which is used for conversational computing in a Thai envi- ronment. See tty(7) for a general description of terminal interfaces. See stty(1) for information on how to activate the features dis- cussed here. The Thai terminal driver is available only when Tru64 UNIX optional subsets for worldwide support are installed. This driver also must be configured into the current running kernel in order for Thai support features to be enabled. Line Disciplines Line discipline switching to the Thai terminal driver is accomplished with the following TIOCSETD ioctl: int ldisc = THAIDISC; ioctl(f, TIOCSETD, &ldisc); Input Sequence Checking The Thai terminal driver supports input sequence checking that complies with the Wototo standard. The three different modes of input sequence checking are as follows: Mode 0 (pass-through) No input checking is performed. This mode allows the application program to handle checking of the input sequence. Mode 1 (basic check) This is the default mode for a Thai system. Mode 2 (strict) This mode imposes additional constraints in order to reject obviously illegal input sequences. Input Reordering Input reordering mode, if activated, will reorder the following two types of Thai sequences: L3L1L2 -> L3L2L1 L3L4L1 -> L3L1L4 In these sequences, L1, L2, L3, and L4 are level-1, level-2, level-3, and level-4 characters, respectively. History Mode Line Editing The history mode of the Thai terminal driver allows users to use Emacs-like control codes to edit previously entered command lines. Up to 32 lines can be stored and each line can have a maximum width of 127 characters. However, short command lines, those that are fewer than three characters in length, are not stored in the history list. Depending on the editing command used, the unit of editing may be a character, a cell, or a word. A cell is one physical display column on the screen and may consist of one ASCII character or one to three Thai characters. In this context, a word is a string of characters delimited by white spaces. The following editing commands are available in the history mode: Move to the beginning of the line. Delete the cell under the cursor. Move to the end of the line. Recall the previous command in the history list. Recall the next command in the history list. Move the cursor to the left by one cell. Move the cursor to the right by one cell. Delete the Thai character immediately before the cursor. You can use the stty command to determine and set the character that erases a character. Delete the word before the cursor. You can use the stty command to determine and set the character that erases a word. Typing a normal character causes it to be inserted before the character under the cursor. The kill, interrupt, and suspend characters cause the Thai terminal driver to break out of the history mode. Input sequence checking and input reordering are not performed in history mode. The line-editing features support only single-line edit- ing, not multiple-line editing. For instance, if the cursor is wrapped to the beginning of the next line, you cannot return the cursor to the previous line by pressing the left arrow key. RELATED INFORMATION
Commands: stty(1) Functions: ioctl(2) Files: tty(7) Others: Thai(5), Wototo(5) delim off ttty(7)
All times are GMT -4. The time now is 07:00 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy