From d841be78be91eaccb2ca3b553298161fb849a5c5 Mon Sep 17 00:00:00 2001 From: Chris Lexmond Date: Thu, 25 Apr 2013 21:25:09 -0400 Subject: [PATCH] Added check for UTF-8 to make sure postgres creates db --- install-reddit.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/install-reddit.sh b/install-reddit.sh index 55ea62069..ee427ee8a 100755 --- a/install-reddit.sh +++ b/install-reddit.sh @@ -70,6 +70,13 @@ if [[ $EUID -ne 0 ]]; then exit 1 fi +# Make sure the LC_CTYPE is UTF-8, otherwise postgres fails to create db +# If you run into this error, run something like: export LC_ALL=en_US.UTF-8 +if [ "$LC_CTYPE" != "UTF-8" ]; then + echo "ERROR: LC_CTYPE must be a UTF-8 locale." + exit 1 +fi + # seriously! these checks aren't here for no reason. the packages from the # reddit ppa aren't built for anything but precise (12.04) right now, so # if you try and use this install script on another release you're gonna