diff --git a/version.sh b/version.sh
index d1090f656dc6987d2fb33cde7a65b2e2b9c85a80..dff7ea33005b427ea2e1152cb872608d7131ce6a 100755
--- a/version.sh
+++ b/version.sh
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-svn_revision=`cd "$1" && LANG=C svn info 2> /dev/null | grep Revision | cut -d' ' -f2`
+svn_revision=`cd "$1" && LC_ALL=C svn info 2> /dev/null | grep Revision | cut -d' ' -f2`
 test $svn_revision || svn_revision=UNKNOWN
 
 NEW_REVISION="#define FFMPEG_VERSION \"SVN-r$svn_revision\""