post-receive hook: force UTF-8 locale
this fixes encoding errors when the pages are generated in the post-receive hook.
1 files changed, 4 insertions(+), 0 deletions(-) | |||
---|---|---|---|
M | example_post-receive.sh | +4 | -0 |
1@@ -8,6 +8,10 @@
2 # if name is not set the basename of the current directory is used,
3 # this is the directory of the repo when called from the post-receive script.
4
5+# NOTE: needs to be set for correct locale (expects UTF-8) otherwise the
6+# default is LC_CTYPE="POSIX".
7+export LC_CTYPE="en_US.UTF-8"
8+
9 name="$1"
10 if test "${name}" = ""; then
11 name=$(basename $(pwd))