繁体   English   中英

崇高的文字和Linux-KDE。 系统区域设置设置为不能处理非ASCII字符的值

[英]Sublime text & Linux-KDE. System locales is set to a value that can not handle non-ASCII characters

打开ST3时出现此错误。 程序包控制不起作用。

程序包控制系统的本地设置为无法处理非ASCII字符的值。 除非已解决,否则Package Control无法正常工作。

在Linux上,请参考发行版的文档,以正确设置LANG环境变量。 作为临时的解决方法,您可以使用以下命令从终端启动Sublime Text:

LANG = zh_CN.UTF-8 sublime_text

术语解决方法不起作用。 另外,当我在终端中写“ locale”时,我得到:

locale: Cannot set LC_CTYPE to default locale: No such file or directory                                                             
locale: Cannot set LC_MESSAGES to default locale: No such file or directory                                                          
locale: Cannot set LC_ALL to default locale: No such file or directory                                                               
LANG=en_EC.UTF-8                                                                                                                     
LANGUAGE=en:es:en                                                                                                                    
LC_CTYPE="en_EC.UTF-8"                                                                                                               
LC_NUMERIC=en_EC.UTF-8                                                                                                               
LC_TIME=en_EC.UTF-8                                                                                                                  
LC_COLLATE="en_EC.UTF-8"                                                                                                             
LC_MONETARY=en_EC.UTF-8                                                                                                              
LC_MESSAGES="en_EC.UTF-8"                                                                                                            
LC_PAPER=en_EC.UTF-8                                                                                                                 
LC_NAME=en_EC.UTF-8                                                                                                                  
LC_ADDRESS=en_EC.UTF-8                                                                                                               
LC_TELEPHONE=en_EC.UTF-8                                                                                                             
LC_MEASUREMENT=en_EC.UTF-8                                                                                                           
LC_IDENTIFICATION=en_EC.UTF-8                                                                                                        
LC_ALL=                        

请帮忙。 我在Ubuntu + KDE上,我现在盲目地编写代码,没有安装Sublime软件包。

在尝试通过ChromeOS的Chroot Sublime Text Build 3083中的指定方法在Ubuntu 14.04 LTS上安装Package Control时遇到了相同的问题。

此问题的副本位于以下位置,此问题的明智解决方案: https : //askubuntu.com/a/440341/200027

该解决方案包括将“ bash -c“ LANG = en_US.UTF-8 / opt / sublime_text / sublime_text”添加到位于/usr/applications/share/sublime_text.desktop的Sublime .desktop统一启动文件的相应Exec行中:

[Desktop Entry]
Version=1.0
Type=Application
Name=Sublime Text
GenericName=Text Editor
Comment=Sophisticated text editor for code, markup and prose
Exec=bash -c "LANG=en_US.UTF-8 /opt/sublime_text/sublime_text %F"
Terminal=false
MimeType=text/plain;
Icon=sublime-text
Categories=TextEditor;Development;
StartupNotify=true
Actions=Window;Document;

[Desktop Action Window]
Name=New Window
Exec=bash -c "LANG=en_US.UTF-8/opt/sublime_text/sublime_text -n"
OnlyShowIn=Unity;

[Desktop Action Document]
Name=New File
Exec= bash -c "LANG=en_US.UTF-8/opt/sublime_text/sublime_text --command new_file"
OnlyShowIn=Unity;

请注意,您将需要sudo来编辑该桌面启动文件。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM