免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1073 | 回复: 0
打印 上一主题 下一主题

luin的使用 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-12-18 10:02 |只看该作者 |倒序浏览
    最近把系统换成了Debian系统,中文使用utf8编码,但由于之前是在WINDOWS上工作,加上之前有些脚本程序在BSD上编写,中文注释用的全是GB2312的编码,这下郁闷了,乱码。。。本来是装了mrxvt,使用GB2312看倒也是可以,但由于自己习惯了xfce自带的Terminal,所以还是觉得用些不习惯,后来在terminal的HELP里看到这段:
               
               
                Terminal itself does not (yet) include builtin support for switching encodings on the fly in a terminal session. But since Terminal implements an UTF-8 mode, you can use the Luit application to switch between different character encodings within a terminal session.
就去看了一下luit的man手册,
       Luit is a filter that can be run between an arbitrary application and a
       UTF-8 terminal emulator.  It will convert application output  from  the
       locale’s  encoding  into  UTF-8,  and convert terminal input from UTF-8
       into the locale’s encoding.
       An application may also request switching to a different output  encod‐\
       ing  using ISO 2022 and ISO 6429 escape sequences.  Use of this feature
       is  discouraged:  multilingual  applications  should  be  modified   to
       directly generate UTF-8 instead.
       Luit  is  usually  invoked transparently by the terminal emulator.  For
       information about running luit from  the  command  line,  see  EXAMPLES
       below.
EXAMPLES
       The most typical use of luit is to adapt an instance of  XTerm  to  the
       locale’s encoding.  Current versions of XTerm invoke luit automatically
       when it is needed.  If you are using an older release of  XTerm,  or  a
       different terminal emulator, you may invoke luit manually:
              $ xterm -u8 -e luit
       If  you  are  running  in  a  UTF-8  locale but need to access a remote
       machine that doesn’t support UTF-8, luit can adapt the remote output to
       your terminal:
              $ LC_ALL=fr_FR luit ssh legacy-machine
上面内容大概截取了我用到的那部份,具体当然是看man了


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u1/52698/showart_444762.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP