projects
/
forks
/
stagit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d7e003a
)
post-receive hook: force UTF-8 locale
author
Hiltjo Posthuma
<hiltjo@codemadness.org>
Tue, 31 Oct 2017 22:20:18 +0000
(23:20 +0100)
committer
Hiltjo Posthuma
<hiltjo@codemadness.org>
Tue, 31 Oct 2017 22:20:18 +0000
(23:20 +0100)
this fixes encoding errors when the pages are generated in the
post-receive hook.
example_post-receive.sh
patch
|
blob
|
history
diff --git
a/example_post-receive.sh
b/example_post-receive.sh
index ba87e5175bb084e84c8d58324fe0b8532cf1bf50..549a7f8b4acbbe9d29ce58507228bcc6870a9270 100755
(executable)
--- 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))