diff --git a/CHANGELOG b/CHANGELOG index 95d1355071..444d43b75f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -17,6 +17,8 @@ git-annex (6.20161211) UNRELEASED; urgency=medium * p2p: --link no longer takes a remote name, instead the --name option can be used. * Debian: Build webapp on armel. + * Linux standalone: Improve generation of locale definition files, + supporting locales such as, en_GB.UTF-8. -- Joey Hess Sun, 11 Dec 2016 21:29:51 -0400 diff --git a/doc/bugs/Linux_standalone__39__s_metadata_--batch_can__39__t_parse_UTF-8/comment_1_1765400777911cc61eb591b76c84ae89._comment b/doc/bugs/Linux_standalone__39__s_metadata_--batch_can__39__t_parse_UTF-8/comment_1_1765400777911cc61eb591b76c84ae89._comment new file mode 100644 index 0000000000..cf591d65ed --- /dev/null +++ b/doc/bugs/Linux_standalone__39__s_metadata_--batch_can__39__t_parse_UTF-8/comment_1_1765400777911cc61eb591b76c84ae89._comment @@ -0,0 +1,21 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 1""" + date="2016-12-19T20:37:56Z" + content=""" +JSON uses a UTF-8 encoding. So the usual hack used in git-annex +of bypassing the system locale and essentially reading data as binary can't +work for --json. + +So, I think you need to be using a unicode locale, which is properly set up +in order to use --json. And, the data fed in via --json needs to actually +be encoded as unicode and not some other encoding. + +runshell was recently changed to bypass using the system locales, it +includes its own locale data and attempts to generate a locale definition +file for the locale. The code that did that was failing to notice that +en_GB.UTF-8 was a UTF-8 locale (en_GB.utf8 would work though), which +explains why the locale is not set inside runshell +(git-annex.linux/git-annex is a script that uses runshell). I've corrected +that problem, and verified it fixes the problem you reported. +"""]] diff --git a/standalone/linux/skel/runshell b/standalone/linux/skel/runshell index d6bec7aa38..a4578eb1b2 100755 --- a/standalone/linux/skel/runshell +++ b/standalone/linux/skel/runshell @@ -132,7 +132,7 @@ for localeenv in "$LANG" "$LANGUAGE" "$LC_CTYPE" "$LC_NUMERIC" "$LC_TIME" \ if [ "$localeenv" != "$lastlocaleenv" ]; then lastlocaleenv="$localeenv" if [ ! -d "$base/locales/$localeenv" ]; then - if [ "${localeenv##[!.]*.}" = "utf8" ]; then + if [ "${localeenv##[!.]*.}" = "utf8" ] || [ "${localeenv##[!.]*.}" = "UTF-8" ]; then ( rm -rf "$base/locales/$localeenv.new.$$" && mkdir -p "$base/locales/$localeenv.new.$$" &&