Здраво! I've been learning about Unicode over the last few days. I've picked up a ton of information, so I figured I'd share what I've learned with the mailing list. I would like to here about other people's experiences, too.
Here's a list of things I wanted to share: 1) Fedora and Ubuntu have en_US.UTF-8 (Unicode English) as the default locale. Debian is one of the few modern distributions I've seen that doesn't have en_US.UTF-8 as the default. I ran "dpkg-reconfigure locales" and selected "All locales" to fix this. 2) I used to use aterm as my terminal. I now use rxvt-unicode. There are a number of others that work well with Unicode, too. Plain old xterm, plain old rxvt, and plain old aterm are not Unicode-aware. 3) Almost all character sets any of us will run into are extensions of ASCII, which only includes characters from 0 to 127. Any characters that aren't control characters, basic punctuation, letters, or numbers are extended characters that are guaranteed to look wrong if you're using the wrong character set. When you have the wrong character set, you'll get gibberish where ever you would see an extended character. 4) We all should be using Unicode, but we aren't quite there yet. Unicode is the only character encoding that can deal with all different types of characters. The alternatives are all national encodings that only deal with certain types of characters. I feel that having switched has been an improvement. 5) Make sure that your locale is en_US.UTF-8. I added the following to my zshrc: export LANG="en_US.UTF-8" If your LANG is just en_US, then you're using ISO-8859-1 (latin-1), which is certainly not Unicode. Most applications use LANG to decide which character sets to use for output. For example, any ncurses program with line drawing will use different output characters when using different character sets. You probably also want to change the system-wide default (maybe in /etc/enviroment or somewhere like that), since the environment variable needs to get set before the terminal program is started. 6) If your terminal is using Unicode, you should be able to read this email message in a terminal-based program like Mutt or Lynx and see the Cyrillic characters that I've included. It should look Serbian (if you don't know Serbian, it should at least look kind-of like Russian). If you see anything else, then your terminal isn't using Unicode (or something related is broken). 7) Vim makes it pretty easy to add Unicode characters inline. For characters that I use a lot of, I'm going to come up with a way to make shortcuts (I have some ideas on how to do this, but I'm also open to suggestions). I'll use the name of the Church in Serbian as an example. In Vim, you hit CTRL-V while in insert mode to tell it that you want to enter a character by character code. Unicode tables are available at http://www.unicode.org/charts/. Type u (for 4-digit hex value) followed by the keycode, and it will magically appear: CTRL-v u0426 CTRL-v u0440 CTRL-v u043a CTRL-v u0432 CTRL-v 0430 ... Црква Исуса Хриса светаца последњих дана In the Latin alphabet, it looks like: Crkva Isusa Hrista svetaca poslednjih dana (it looks like my font doesn't have that nj (CTRL-V 01cc) character--I'll have to check into that) Anyway, that's it for now. -- Andrew McNabb http://www.mcnabbs.org/andrew/ PGP Fingerprint: 8A17 B57C 6879 1863 DE55 8012 AB4D 6098 8826 6868
pgpLWpXkPcPks.pgp
Description: PGP signature
-------------------- BYU Unix Users Group http://uug.byu.edu/ The opinions expressed in this message are the responsibility of their author. They are not endorsed by BYU, the BYU CS Department or BYU-UUG. ___________________________________________________________________ List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list
