SVN cannot set LC_CTYPE locale

I started getting the following error when I use SVN on my server:

svn: warning: cannot set LC_CTYPE locale svn: warning: environment variable LC_CTYPE is UTF-8 svn: warning: please check that your locale name is correct 

I suppose there might be something wrong with my svn client (using the Versions app) and the svn server ...

How can I make this warning disappear from the server forever whenever I use such commands?

+51
svn locale
Jul 02 '12 at 20:22
source share
10 answers

Check output

 locale -a 

If the locale that SVN binds to is not set, you can set it.

You may need to do:

 sudo apt-get install language-pack-en-base 

followed by one of (depending on the exact SVN error, your first case):

 sudo locale-gen UTF-8 sudo locale-gen en_GB.UTF-8 sudo locale-gen en_US.UTF-8 

Alternatively, as Ankit writes:

 export LC_ALL=C 

may work (in your current session or in your .profile).

+53
Jul 04 2018-12-12T00:
source share

Although setting LC_CTYPE to an empty value worked for me, the main reason was that the Terminal application on my Mac set locales at startup, even when I SSH to another system.

This can be fixed in Terminal> Preferences:

  • Select the โ€œProfilesโ€ tab and select โ€œAdvancedโ€ in the sub-tabs
  • Uncheck "Set locale environment variables at startup"
+40
Nov 20 '13 at 10:57
source share

If you want to fix this, set the LC_ALL variable manually.

To make it permanent, simply edit the file "/ etc / environment" and add the line:

 LC_ALL=C 

Save the file and exit the editor. To use it, you must exit the current shell session. The next time you log in, the problem with SVN will disappear.

+20
Jul 03 2018-12-12T00:
source share

The LC_ALL and LANG settings did not work for me, but LC_CTYPE.

 LC_CTYPE=en_US.UTF-8 
+12
Dec 27 '12 at 14:07
source share

In Debian Jessie :

I ran:

 sudo dpkg-reconfigure locales 

Added and installed the missing locale. Then it worked.

+5
Mar 07 '16 at 11:15
source share

commenting out lines using SendEnv LANG LC_* in / etc / ssh / ssh _config helps me (openSUSE)

+2
Aug 03 '15 at 5:30
source share

This is because the correct locales are not created on your system.

Uncommented lines that you want to support in /etc/locale.gen

For example:

 en_GB.UTF-8 UTF-8 en_US.UTF-8 UTF-8 ru_RU.UTF-8 UTF-8 

and then run sudo locale-gen

+1
Mar 20 '15 at 8:27
source share

We had this problem in our company when using IntelliJ. My colleague just fixed it.

For us, the problem was the SendEnv LANG LC_* in /etc/ssh/ssh_config . When I commented on this line, everything was fine.

+1
Jun 30 '16 at 7:44
source share

I found that combining multiple answers allows you to get the right behavior.

  • We must set the correct locale (localadm for sunos, locale-gen for linux)
  • We must set LC_ALL to the appropriate locale.

It depends on what file names you have in the source tree. For example, I have English, Hebrew and Arabic. en_US.UTF-8 works for me "C" on its own led to files that I could not update.

0
Dec 27 '12 at 22:11
source share

For iTerm2:

Profiles โ†’ Open profiles ... โ†’ Change profiles ... โ†’ Terminal โ†’ Cancel Automatically set language variables

0
Nov 07 '16 at 10:01
source share



All Articles