post-receive hook: force UTF-8 locale - stagit-gopher - A git gopher frontend. (mirror) (HTM) git clone git://bitreich.org/stagit-gopher/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/stagit-gopher/ (DIR) Log (DIR) Files (DIR) Refs (DIR) Tags (DIR) README (DIR) LICENSE --- (DIR) commit 77efc691c14e0f1c2309b1709d598e0d106124ec (DIR) parent 9d2866fca3e3de693e52a21d7274ba00f7acfdf9 (HTM) Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Wed, 18 Oct 2017 18:16:34 +0200 post-receive hook: force UTF-8 locale this fixes encoding errors when the pages are generated in the post-receive hook. Diffstat: M example_post-receive.sh | 4 ++++ 1 file changed, 4 insertions(+), 0 deletions(-) --- (DIR) diff --git a/example_post-receive.sh b/example_post-receive.sh @@ -8,6 +8,10 @@ # if name is not set the basename of the current directory is used, # this is the directory of the repo when called from the post-receive script. +# NOTE: needs to be set for correct locale (expects UTF-8) otherwise the +# default is LC_CTYPE="POSIX". +export LC_CTYPE="en_US.UTF-8" + name="$1" if test "${name}" = ""; then name=$(basename $(pwd))