Reinier Lamers <[email protected]> writes: Fix locale switching in emailformat.sh test -------------------------------------------
> Reinier Lamers <[email protected]>**20090906111406 > hunk ./tests/emailformat.sh 7 > > set -ev > # TODO: is this really enough to make all commands interpret the given > strings > -# as latin1? > -export LANG="en_US.ISO-8859-1" > +# as latin9? > +latin9_locale=`locale -a | grep @euro | head -n 1` > +if [ -z $latin9_locale ]; then > + echo "no latin9 locale found" > + exit 200 # skip, we can't switch away from UTF-8 > +fi > + > +echo "Using locale $latin9_locale" > +export LC_ALL=$latin9_locale > +echo "character encoding is now `locale charmap`" > > rm -rf temp1 > rm -rf temp2 I'm not sure, but I'd guess that the "locale" command is not available at least on Windows, but its manpage doesn't mention it being part of POSIX and instead says it was written for glibc, which may be a further portability problem. I'd suggest doing a if which locale; then latin9_locale=latin9_locale=`locale -a | grep @euro | head -n 1` else latin9_locale=en_US.ISO-8859-1 fi or if it is really required, exit 200 in the else branch. > Context: PS: You too may want to run optimize --reorder on the repository you are sending from, to reduce the amount of context included. It may also make sense to reduce the contexts automatically without requiring people to run optimize --reorder. Hard to tell. _______________________________________________ darcs-users mailing list [email protected] http://lists.osuosl.org/mailman/listinfo/darcs-users
