diff options
author | felics@felics-tablet | 2016-05-20 10:24:23 +0200 |
---|---|---|
committer | felics@felics-tablet | 2016-05-20 10:24:23 +0200 |
commit | 891e4cad1e0f38cf5ab40b87822bb33989420d76 (patch) | |
tree | 57133262a374b176e23b37c2b42fd816451cc947 /idos-timetable-browser.sh | |
parent | 55a6345b709659e2274d62bed8587a9ab6d24752 (diff) | |
download | aur-891e4cad1e0f38cf5ab40b87822bb33989420d76.tar.gz |
Added information about locales, starting with Czech locale if installed, in order to display diacritical characters correctly.
Diffstat (limited to 'idos-timetable-browser.sh')
-rwxr-xr-x | idos-timetable-browser.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/idos-timetable-browser.sh b/idos-timetable-browser.sh index 7ab17aa9e497..f68b0a1d7678 100755 --- a/idos-timetable-browser.sh +++ b/idos-timetable-browser.sh @@ -6,6 +6,9 @@ # command line argument reformatting so that filenames can be # specified both absolutely and relatively to the directory the user # starts this wrapper from. +# +# Also, it starts with a Czech locale, if available, in order to make +# diacritical characters display correctly. @@ -130,10 +133,24 @@ done +### Check for locale, and if present, set Czech locale: + +if locale -a | grep -qE '^cs_CZ'; then + if locale -a | grep -qE '^cs_CZ' | grep -qi utf8; then + LC_CTYPE="$(locale -a | grep -E '^cs_CZ' | grep -i utf8 | head -n 1)" + else + LC_CTYPE="$(locale -a | grep -E '^cs_CZ' | tail -n 1)" + fi + export LC_CTYPE +fi + + + ### Launch the software with the parsed and maybe reformatted arguments: cd "${_installdir}" +debug 'DEBUG: $LC_CTYPE is set to: '"'${LC_CTYPE}' (if it does not begin with 'cs_CZ', try to enable Czech locale on your system to display diacritical characters correctly)." debug "DEBUG: We are running from the directory: '$(pwd)'." debug "DEBUG: Executing the following command: 'wine ${_executable} ${argsnew[@]}'." |