March 18, 2008

‘SVN: Warning Cannot Set LC_CTYPE Locale’ Solution

Posted at: 11:14 pm by Timothy Haroutunian
Categories: Tech and Web

Today while I was using Subversion at work, I was getting annoyed with the warnings we were getting on our development server. I finally decided to look up the warnings to see how to resolve it and I found a solution (at least for us). Here are the warnings we got when I do either an svn up (update) or svn info.

-bash-3.00$ svn info
svn: warning: cannot set LC_CTYPE locale
svn: warning: environment variable LANG is en_US
svn: warning: please check that your locale name is correct

I can’t guarantee that it will work for everyone, but if it helps a few people, it was worth it. All you need to do is go into your favorite shell (tested on bash since it is the default unix shell) and type the following and then hit enter.

Note: This only works on a one-time basis. If you want it to be permanent, you will have to add it to your login script.

export LC_ALL=C

I hope this helps!

Text Link Ads

Post A Comment

    5 Responses to “‘SVN: Warning Cannot Set LC_CTYPE Locale’ Solution”

    1. Avatarlee
      1

      great!
      it helps me~ thanks a lot~

    2. AvatarYannick
      2

      Works for me too !!

      thx for having posted this!

    3. Avatardaybreaker
      3

      This works, but also has a problem.
      If I use non-ASCII characters like Korean in commit messages, the commit operation is failed with the following errors:

      svn: Commit failed (details follow):
      svn: Can’t convert string from native encoding to ‘UTF-8′:
      svn: Now ?\237?\142?\152?\236?\157?\180?\236?\167?\128 ?\237?\133?\156?\237?\148?\140?\235?\166?\191 ?\235?\176?\143 ?\236?\138?\164?\237?\131?\128?\236?\157?\188 ?\236?\136?\152?\236?\160?\149

      I’m using UTF-8 encoding in commit messages.

    4. AvatarJared Beck
      4

      For more information on this, see the the man page for setlocale

    5. AvatarMartin
      5

      I found this post, its seems to be a more…. permanent solution.

      http://codepoets.co.uk/lc_ctype_lc_messages_lc_all_locale_ubuntu

Leave a Comment