VISCII 1.1 If you have Sun OS 4.1, you can use /usr/ucb/vi with vietterm/vnterm (well , almost!). What needed is a locale file. Without this file, 'vi' will echo Viet chars as an octal number, which doesn't look good. With the locale file installed, 'vi' will display Viet chars correctly, except for C0 chars will be display as control equivalent. The C0 chars will still be there for other tools such as vnelvis, more , cat, grep ..., it just get displayed as control-char in 'vi'. Also, with the locale file installed, the "ls" command will also works properly , displaying Vietnamese file names. This is true for Sun programs supporting locale. To install the locale, cut the following included file from the line 'Cut Here', save it to a file , let's call it 'locale.viet' Then do the following: /usr/etc/chrtbl locale.viet The 'chrtbl' command will compile this file, and it normally resides in /usr/etc; this maynot be correct at your site. 'chrtbl' will generate a binary file called 'viscii' . Make sure it can be read by everybody by changing its protection to 644: chmod 644 viscii Copy this file to /usr/share/lib/locale/LC_CTYPE. For ex: cp viscii /usr/share/lib/locale/LC_CTYPE/viscii You need the 'root' privilege to do the copy. Ask a system administrator to do it for you. The file is only 600 byte, and does not affect any other users. Make sure after copying, the protection mode is 644 so you can read it. Then put in your .login file this command to set the environment variable LC_CTYPE: setenv LC_CTYPE viscii Now you can use 'vi' to edit either Viet file or any other file. This example shows our 8bit code ability to integrate with current computing environment. You don't need to relearn or creat a new tool. Almost any Unix tool. ;-) Have fun, Cuong Bui The TriChlor Group bui@berlioz.nsc.com trichlor@haydn.stanford.edu --------------Cut Here -------------------- chrclass viscii isupper 0x41 - 0x5a \ 0xc1 0xc5 0x81 0x83 0x82 0x2 0x5 0xc2 0x84 0x87 \ 0x85 0x86 0x14 0x80 0xc0 0xc4 0xc3 0xd0 0xc9 0xca \ 0x8a 0x8e 0x8b 0x8c 0x8d 0x89 0xc8 0xcb 0x88 0xcd \ 0x98 0xcc 0x9b 0xce 0xd3 0xd4 0x8f 0x93 0x90 0x91 \ 0x92 0x9a 0xd2 0x99 0x94 0x95 0xb4 0x96 0x97 0xb3 \ 0xa0 0xda 0x9e 0xd9 0x9c 0xbf 0xba 0xb9 0xbb 0xbc \ 0xff 0x9d 0xdd 0x1e 0x9f 0x19 0x06 islower 0x61 - 0x7a \ 0xe1 0xe5 0xa1 0xa3 0xa2 0xc6 0xc7 0xe2 0xa4 0xa7 \ 0xa5 0xa6 0xe7 0xd5 0xe0 0xe4 0xe3 0xf0 0xe9 0xea \ 0xaa 0xae 0xab 0xac 0xad 0xa9 0xe8 0xeb 0xa8 0xed \ 0xb8 0xec 0xef 0xee 0xf3 0xf4 0xaf 0xb5 0xb0 0xb1 \ 0xb2 0xf7 0xf2 0xf6 0xbd 0xbe 0xfe 0xb6 0xb7 0xde \ 0xf5 0xfa 0xf8 0xf9 0xfc 0xdf 0xd1 0xf1 0xd7 0xd8 \ 0xe6 0xfb 0xfd 0xdc 0xcf 0xd6 0xdb isdigit 0x30 - 0x39 isspace 0x20 0x9 - 0xd ispunct 0x21 - 0x2f 0x3a - 0x40 \ 0x5b - 0x60 0x7b - 0x7e iscntrl 0x0 0x1 0x3-0x4 0x6-0x9 0x11-0x13 0x15-0x1c 0x7f isblank 0x20 isxdigit 0x30 - 0x39 0x61 - 0x66 \ 0x41 - 0x46 ul <0x41 0x61> <0x42 0x62> <0x43 0x63> \ <0x44 0x64> <0x45 0x65> <0x46 0x66> \ <0x47 0x67> <0x48 0x68> <0x49 0x69> \ <0x4a 0x6a> <0x4b 0x6b> <0x4c 0x6c> \ <0x4d 0x6d> <0x4e 0x6e> <0x4f 0x6f> \ <0x50 0x70> <0x51 0x71> <0x52 0x72> \ <0x53 0x73> <0x54 0x74> <0x55 0x75> \ <0x56 0x76> <0x57 0x77> <0x58 0x78> \ <0x59 0x79> <0x5a 0x7a> \ <0xc1 0xe1> <0xc5 0xe5> <0x81 0xa1> <0x83 0xa3> \ <0x82 0xa2> <0x2 0xc6> <0x5 0xc7> <0xc2 0xe2> \ <0x84 0xa4> <0x87 0xa7> <0x85 0xa5> <0x86 0xa6> \ <0x06 0xe7> <0x80 0xd5> <0xc0 0xe0> <0xc4 0xe4> \ <0xc3 0xe3> <0xd0 0xf0> <0xc9 0xe9> <0xca 0xea> \ <0x8a 0xaa> <0x8e 0xae> <0x8b 0xab> <0x8c 0xac> \ <0x8d 0xad> <0x89 0xa9> <0xc8 0xe8> <0xcb 0xeb> \ <0x88 0xa8> <0xcd 0xed> <0x98 0xb8> <0xcc 0xec> \ <0x9b 0xef> <0xce 0xee> <0xd3 0xf3> <0xd4 0xf4> \ <0x8f 0xaf> <0x93 0xb5> <0x90 0xb0> <0x91 0xb1> \ <0x92 0xb2> <0x9a 0xf7> <0xd2 0xf2> <0x99 0xf6> \ <0xb4 0xbd> <0x95 0xbe> <0x94 0xfe> <0x96 0xb6> \ <0x97 0xb7> <0xb3 0xde> <0xa0 0xf5> <0xda 0xfa> \ <0x9e 0xf8> <0xd9 0xf9> <0x9c 0xfc> <0xbf 0xdf> \ <0xba 0xd1> <0xb9 0xf1> <0xbb 0xd7> <0xbc 0xd8> \ <0xff 0xe6> <0x9d 0xfb> <0xdd 0xfd> <0x1e 0xdc> \ <0x9f 0xcf> <0x14 0xd6> <0x19 0xdb>