«

»

Mar 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!

About the author

Timothy Haroutunian

Timothy Haroutunian is a ServiceNow Cloud Implementation Specialist at Acorio. ServiceNow is an IT Management solution that allows for a complete view of your IT and physical environment.

Permanent link to this article: http://www.armenianeagle.com/2008/03/18/svn-warning-cannot-set-lc_ctype-locale-solution/

10 comments

1 ping

Skip to comment form

  1. lee

    great!
    it helps me~ thanks a lot~

  2. Yannick

    Works for me too !!

    thx for having posted this!

  3. daybreaker

    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. Jared Beck

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

  5. Martin

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

    http://codepoets.co.uk/lc_ctype_lc_messages_lc_all_locale_ubuntu

  6. Jonathan Martinez

    Thanx!! very useful information, but do you also know why this happens? and why this solution works? just curious!

  7. Sudipta Chatterjee

    Saved me an annoying lot of error messages… thanks a ton! 🙂

  8. Ivan

    Thanks! Very helpful!

  9. Ngd

    Worked! Many thanks. But I’m wondering why, what does this command do?

  10. Funciona

    Eso funciona macho. en mi caso funciono.
    saludos.

Leave a Reply