« September 2006 | Main | December 2006 »

November 10, 2006

Tip: Subversion and accentuated characters in commit messages

One of the good things about Subversion is that all his internals (paths, commit messages, etc) are always UTF-8 encoded. I think that was one of the brightest decisions they made.

Yet, for quite some time I was getting errors when I tried to use commit messages with accentuated characters:

subversion/libsvnsubr/utf.c:466: (aprerr=22)

In my case, the problem is that I didn't have a proper LANG environment variable. If run svn ci like this:

LANG=en_US.UTF-8 svn ci

the problem goes away.

Now, having a LANG environment is not something I want just now. I still use software that does not work well with LANG. So my solution was to create a small shell script in my utilities directory like this:

#!/bin/sh
#
# Make SVN commits work with accentuated characters
#

LANG=en_US.UTF-8
export LANG

exec /usr/local/bin/svn $@

Nirvana!

Contacts

melo@simplicidade.org (XMPP/email)
+351 302 029 050 (voice)
melopt (Skype)

IronMan challenge

Iron Man badge Are you ready to be an Iron Man? Join the challenge and find out! (what is the meaning of this little man?)

Moosaico

Junta-te!

Recent Comments

Powered by Disqus
Creative Commons License
This weblog is licensed under a Creative Commons License.
Powered by
Movable Type 3.2