Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 296
Raghav Avatar asked Jul 29 '16 23:07

Raghav


2 Answers

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.

like image 190
andreas Avatar answered Nov 09 '22 15:11

andreas


For those without sudo (e.g. on enterprise CentOS), clear LC_ALL, set LANG, then run:

setenv LC_ALL ''
setenv LANG en_US.UTF-8
subl

Here's a one-liner launcher for csh:

/usr/bin/csh -c "setenv LC_ALL '' && setenv LANG en_US.UTF-8 && subl"
like image 33
Mateen Ulhaq Avatar answered Nov 09 '22 16:11

Mateen Ulhaq