博客首页 注册 建议与交流 排行榜 加入友情链接
推荐 投诉 搜索: 帮助

心在天山

Software design is a craft worth all the intelligence, creativity, and passion you can muster -- Eric S. Raymond (The Art of Unix Programming)
  lgfang.cublog.cn

关于作者
姓名:方伦钢
职业:程序员
年龄:
位置:
个性介绍:
|| << >> ||
我的分类


Input Unicode by It's Hex Value in Emacs

Input Unicode by It's Hex Value in Emacs

(last-edit-by: lgfang 10/21/2006 19:29:43>)

To type in unicode chars by their hex value. You can as following:

  1. M-x set-input-method <ret> ucs <ret>
  2. Key in u+hex to enter a char. For example, unicode of alpha(α) is 03b1 so you would key in 'u03b1' to get the char.

Tip 1:

I experienced errors entering some chars when I set set-keyboard-coding-system as euc-cn. After I change it to nil, errors fixed.

Tip 2:

To tell Emacs a file was encoded with utf-8 you can add

       -*- coding:utf-8 -*-

in the first line of it if Emacs can't detect that by itself.

Tip 3:

To see the unicode of a char, move point on it and then "C-x ="

Table:

There are some freequently used unicodes:

alpha α 03b1 Α 0391
beta β 03b2 Β 0392
gama γ 03b3 Γ 0393
delta δ 03b4 Δ 0394
epsilon ε 03b5 Ε 0395
theta θ 03b8 Θ 0398
xi ξ 03be Ξ 039e
pi π 03c0 Π 03a0
sigma σ 03c3 Σ 03a3
omega ω 03c9 Ω 03a9
pound £ 00a3
yen ¥ 00a5
lira 20a4
euro 20ac
copyright © 00a9

2248

发表于: 2006-10-21,修改于: 2007-02-16 18:42,已浏览655次,有评论1条 推荐 投诉


网友评论
网友: bienilz 时间:2008-12-17 14:38:59 IP地址:125.46.31.★
thanks!

 发表评论