Showing results for 
Search instead for 
Do you mean 

VI EDITOR

Occasional Contributor

VI EDITOR

Say I want to put in some characters like
??
??
??
??
??
??
??
??
??
??
??
in the vi editor - is it possible ?
And if it is how do I do it? Or what is the criteria so that I can process those characters using C++ or any other programming language!

Any help would be appreciated.
2 REPLIES
Respected Contributor Respected Contributor

Re: VI EDITOR

There are several criteria that must be met inorder to input characters above 127. (See locale(1) and other referenced man pages.)



a/ The locale must recognize the characters as isprint().



b/ The terminal emulator must be internationalized (I10N'd) & localized. It must be capable of loading an appropriate font for the given locale.



c/ The tty/pty used by the terminal must be set to allow 8-bit character display (stty cs8 -strip -parity).



d/ The application (vi in this example) must be I10N'd.



Provided that these are met, the HP X server supports a "compose" feature using "mute"/"dead" keys [ALT]+[RTYUI].



[ALT+R] usldead_acute

[ALT+T] usldead_grave

[ALT+Y] usldead_asciicircum

[ALT+U] usldead_diaeresis

[ALT+R] usldead_asciitilde



So, for example, to generate , one would type [ALT+R]-[e], or [ALT+R]-[SHIFT][e] for .



This assumes a PS/2 or USB US English keyboard (see /etc/kbd_lang) being used directly on an HP X server.



While inputing from other sources should theoretically be possible, it would depend on the capabilities of the terminal / X emulation being used.



Highlighted
Honored Contributor Honored Contributor

Re: VI EDITOR

Hello,

your terminal line must permit 8bit characters, too:

stty cs8 -istrip

AND you'll need the proper fonts (I do expect you to use X-Windows/CDE, right?).
You might have to use "xmodmap" to set up some so-called "dead" keys for the accents, to be able to enter the characters with accents/tildas/tremas (diacritical characters)...

HTH,
Wodisch