[问题]关于文件名乱码问题
yccheok@yccheok-desktop:~/Desktop$ locale | grep LANG=
我相信我以安装了GB2312 locale
yccheok@yccheok-desktop:~/Desktop$ sudo dpkg-reconfigure locales
Generating locales...
en_AU.UTF-8... up-to-date
en_BW.UTF-8... up-to-date
en_CA.UTF-8... up-to-date
en_DK.UTF-8... up-to-date
en_GB.UTF-8... up-to-date
en_HK.UTF-8... up-to-date
en_IE.UTF-8... up-to-date
en_IN.UTF-8... up-to-date
en_NZ.UTF-8... up-to-date
en_PH.UTF-8... up-to-date
en_SG.UTF-8... up-to-date
en_US.UTF-8... up-to-date
en_ZA.UTF-8... up-to-date
en_ZW.UTF-8... up-to-date
zh_CN.GB2312... up-to-date
zh_CN.UTF-8... up-to-date
zh_HK.UTF-8... up-to-date
zh_SG.UTF-8... up-to-date
zh_TW.UTF-8... up-to-date
Generation complete.
我有些文件,在firefox下的GB2312 encoding,能显示出来。可当我用gedit 或是vi, 就是乱码。
请问各位有什么建议吗?我需要在en_US.UTF-8环境下执行,可又能编辑GB2312文件。。。
谢谢
作者: yccheok 发布时间: 2006-08-12
至于vim就更方便了,在你的.vimrc中加上下面的代码,以后就会自动检测编码了。
set fileencodings=utf-8,gbk,ucs-bom,cp936
作者: karron 发布时间: 2006-08-12
作者: yccheok 发布时间: 2006-08-13
作者: kuerbt 发布时间: 2006-08-14
作者: karron 发布时间: 2006-08-14
在“应用程序”菜单上点右键,选择“编辑菜单”.在主菜单的对话框中勾选系统工具-配置编辑器,并从应用程序菜单中开启。
依次开启 /apps/gedit-2/preferences/encodings/双击右侧auto_detected,在弹出对话框中点选Add,添加Values值为GB2312,确定后选中,点选Up按钮将其移至第一位。
同样方法,对show_in_menu进行设置,并将GB2312置于首位。
作者: myzod 发布时间: 2009-08-18
在“应用程序”菜单上点右键,选择“编辑菜单”.在主菜单的对话框中勾选系统工具-配置编辑器,并从应用程序菜单中开启。
依次开启 /apps/gedit-2/preferences/encodings/双击右侧auto_detected,在弹出对话框中点选Add,添加Values值为GB2312,确定后选中,点选Up按钮将其移至第一位。
同样方法,对show_in_menu进行设置,并将GB2312置于首位。
这个方法不错,非常感谢:)
作者: danielliu 发布时间: 2009-09-08
作者: ancintosh 发布时间: 2009-09-08
leafpad同荐,X下修改配置文件必备。
作者: wangdu2002 发布时间: 2009-09-08
gconftool-2 --set --type=list --list-type=string /apps/gedit-2/preferences/encodings/auto_detected "[UTF-8,CURRENT,GBK,BIG5-HKSCS,UTF-16]"
一条命令搞定
作者: sunzhaoyu2000 发布时间: 2009-09-16
gconftool-2 --set --type=list --list-type=string /apps/gedit-2/preferences/encodings/auto_detected "[UTF-8,CURRENT,GBK,BIG5-HKSCS,UTF-16]"
一条命令搞定
楼上这招一键搞定gedit编码的方法不错。复制之。
作者: wangdu2002 发布时间: 2009-09-16
gconftool-2 --set --type=list --list-type=string /apps/gedit-2/preferences/encodings/auto_detected "[UTF-8,CURRENT,GBK,BIG5-HKSCS,UTF-16]"
一条命令搞定
太感谢了
作者: 柳岸晓风 发布时间: 2009-09-18
另外,改系统设置我只会用nano。。。
作者: tenzu 发布时间: 2009-09-18
或用vim,比gedit专业多了。
vim的配置文件里写:
set fileencodings=ucs-bom,utf-8,cp936,gb18030,iso-8859-1
set encoding=utf-8
作者: sevk 发布时间: 2009-09-18
gconftool-2 --set --type=list --list-type=string /apps/gedit-2/preferences/encodings/auto_detected "[UTF-8,CURRENT,GBK,BIG5-HKSCS,UTF-16]"
一条命令搞定
3Q
作者: mjp123 发布时间: 2009-09-28