Search code examples
sublimetext3sublimetext

Sublime package LANG setting


I have downloaded and unzipped Sublime 3 package for Red Hat linux. I have sublime_text in my /downloads/sublime_text_3.

When I open ./sublime_text, I get the following error

Package Control

Your system's locale 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 information 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

I tried changing setenv LANG en_US.UTF-8 with no positive effects.


Solution

  • Have you tried the solutions given in the package control issue on Github?

    If LANG=en_US.UTF-8 sublime_text and LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 sublime_text don't work, you can try the following:

    Define a system wide locale [...]:

    in /etc/locale.conf:

    LANG="en_US.UTF-8"
    

    And reboot your sytem.

    or

    simply changing only the LANG variable in /etc/locale.conf from my default setting to en_US.UTF-8, as so --

    /etc/locale.conf:

    LANG=en_US.UTF-8
    LC_CTYPE="C"
    LC_NUMERIC="C"
    LC_TIME="C"
    LC_COLLATE="C"
    LC_MONETARY="C"
    LC_MESSAGES="C"
    LC_PAPER="C"
    LC_NAME="C"
    LC_ADDRESS="C"
    LC_TELEPHONE="C"
    LC_MEASUREMENT="C"
    LC_IDENTIFICATION="C"
    LC_ALL=
    

    -- but Package Control continued to throw the error until I culled the file down to only the first line --

    /etc/locale.conf:

    LANG=en_US.UTF-8
    

    Hope that helps someone!

    You can also check this question.