简体   繁体   中英

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

I'm getting this error when I open ST3. Package control is not working.

Package Control Your system's local is set to a value that can not handle non ASCII characters. Package Control can not properly work unless this is fixed.

On Linux, please reference your distribution's docs for on properly setting the LANG environmental variable. As a temporary work-around, you can launch Sublime Text from the terminal with:

LANG=en_US.UTF-8 sublime_text

The termporary workaround doesn't work. Also, when I write 'locale' in the terminal I get:

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=                        

Please help. I'm on Ubuntu+KDE, Im coding blindly now with no sublime packages installed.

I had the same issue while attempting to install Package Control on Ubuntu 14.04 LTS via the prescribed method within Chroot of ChromeOS, Sublime Text Build 3083.

A sensible solution for this problem exists in a duplicate of this issue here: https://askubuntu.com/a/440341/200027

The solution involves adding "bash -c "LANG=en_US.UTF-8 /opt/sublime_text/sublime_text" to the appropriate Exec lines of Sublime's .desktop unity launch file located at /usr/applications/share/sublime_text.desktop as follows:

[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;

Note that you will need sudo to edit that desktop launch file.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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