Skip to content
Permalink
Browse files

quickinstall: handle multibyte characters in path (#265)

Problem: Qt5 UIC cannot create a file if its absolute path contains
multibyte characters and LC_CTYPE is set to "C".

Solution: set all (but LC_CTYPE and LC_COLLATE) POSIX locale environment
variables to "C". LC_CTYPE and LC_COLLATE should be set to the original
locale via LANG. Avoid LC_ALL.

Closes: #265
  • Loading branch information...
Oleksii Vilchanskyi authored and tatokis committed Dec 16, 2018
1 parent 8db1a7d commit 44d253f4d46a38d9b669863966f24218a94cff2c
Showing with 24 additions and 1 deletion.
  1. +24 −1 quickinstall
@@ -1,6 +1,29 @@
#!/usr/bin/env bash

export LC_ALL=C
# We want to see the logs in English
if [[ -z "$LC_ALL" && -z "$LANG" ]]; then
echo "* Weird, neither LC_ALL nor LANG is set:"
locale
echo "* Trying LANG=en_US.UTF-8 anyway"
export LANG="en_US.UTF-8"
else
# don't let LC_ALL to be set because it always overrides all LC_*,
# while LANG only sets LC_* once
if [[ ! -z "$LC_ALL" ]]; then
export LC_ALL=
fi
fi

export LC_NUMERIC=C
export LC_TIME=C
export LC_MONETARY=C
export LC_MESSAGES=C
export LC_PAPER=C
export LC_NAME=C
export LC_ADDRESS=C
export LC_TELEPHONE=C
export LC_MEASUREMENT=C
export LC_IDENTIFICATION=C

function checkfail {
if [[ $1 -ne 0 ]]; then

0 comments on commit 44d253f

Please sign in to comment.
You can’t perform that action at this time.