March 18, 2008
‘SVN: Warning Cannot Set LC_CTYPE Locale’ Solution
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!

10 Responses to “‘SVN: Warning Cannot Set LC_CTYPE Locale’ Solution”
Posted: Mar 20th, 2008 at 10:30 pm
great!
it helps me~ thanks a lot~
Posted: Apr 2nd, 2008 at 8:15 am
Works for me too !!
thx for having posted this!
Posted: Aug 11th, 2008 at 10:45 am
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.
Posted: Feb 27th, 2009 at 12:17 pm
For more information on this, see the the man page for setlocale
Posted: Jun 25th, 2009 at 10:55 pm
I found this post, its seems to be a more…. permanent solution.
http://codepoets.co.uk/lc_ctype_lc_messages_lc_all_locale_ubuntu
Posted: Jul 28th, 2009 at 5:02 pm
Thanx!! very useful information, but do you also know why this happens? and why this solution works? just curious!
Posted: Nov 24th, 2009 at 6:51 pm
Saved me an annoying lot of error messages… thanks a ton!
Posted: Jan 26th, 2010 at 2:52 pm
Thanks! Very helpful!
Posted: Jan 31st, 2010 at 10:33 am
Worked! Many thanks. But I’m wondering why, what does this command do?
Posted: Jan 31st, 2010 at 1:36 pm
[...] http://armenianeagle.com [...]