cht電腦資訊Linux
adm Find login register

luit - 自動轉換編碼的小工具

coolcd
joined: 2008-01-21
posted: 2596
promoted: 348
bookmarked: 95
1subject: luit - 自動轉換編碼的小工具Promote 2 Bookmark 12009-03-15quote  

第一次看到 luit 是在 UTF-8 Notes

luit 是一個藏在 XFree86 中可以自動轉換編碼的小工具,看它的 manpage 中 name  的簡介, Locale and ISO 2022 support for Unicode terminals,實在不太清楚,要看完 description 才知道它可以做什麼。

簡言之,luit 可以讓 unicode terminal 支援其他 locale 的環境。在 utf-8 terminal 中,用它來跑其他 application,它可以把 utf-8 terminal 的 input 轉換成 application 所需的 locale encoding,也可以把 application 以 locale encoding 輸出的資訊轉換成 utf-8 讓 utf-8 terminal 接收。

最好的使用例子,就是用 luit 在 utf-8 terminal 跑 big5 的 bbs。

$ luit -encoding big5 telnet ptt.cc

manpage 內還有其他例子,不過我都用不到。

luit 在 Debian 中是包在 x11-utils 內。

luit 這個名字,不曉得為什麼,我常常要用時都忘掉,所以寫下這篇以便以後忘了可以查。

luit 是荷蘭文中「魯特琴」的意思,英文是 lute,法文是 luth。

edited: 2
本人已不在此站活動

joined: 2007-09-19
posted: 4946
promoted: 325
bookmarked: 206
歸隱山林
2subject: Promote 0 Bookmark 02009-03-15quote  

如果是用 vte 寫的 terminal 大概會失敗?不過,話說用 vte 寫的 terminal 大概也就無需用到 luit 了。


coolcd
joined: 2008-01-21
posted: 2596
promoted: 348
bookmarked: 95
3subject: Promote 0 Bookmark 02009-03-15quote  

我試過 lilyterm 和 evilvte,大致上還 ok。

用 luit 時,有遇到某些畫面稍微亂掉的問題,可能跟字型或 unicode <-> big5 對照表有關,沒有認真去研究。

cht電腦資訊Linux
adm Find login register
views:10171