diff --git a/install_minimal/airtime-install b/install_minimal/airtime-install index 06c317f08..0b73569b1 100755 --- a/install_minimal/airtime-install +++ b/install_minimal/airtime-install @@ -185,6 +185,14 @@ if [ "$DO_UPGRADE" -eq "0" ]; then fi set -e +echo "* Making sure /etc/default/locale is set properly" +update-locale +cat /etc/default/locale | grep -i "LANG=.*UTF-\?8" +if [ "$?" != "0" ]; then + echo "non UTF-8 default locale found in /etc/default/locale.".PHP_EOL; + exit 1 +fi + $SCRIPTPATH/include/airtime-copy-files.sh $SCRIPTPATH/include/airtime-initialize.sh $@ diff --git a/python_apps/media-monitor/airtime-media-monitor b/python_apps/media-monitor/airtime-media-monitor index 553568032..4af3f4be8 100755 --- a/python_apps/media-monitor/airtime-media-monitor +++ b/python_apps/media-monitor/airtime-media-monitor @@ -15,7 +15,7 @@ cd ${media_monitor_path} exec 2>&1 export PYTHONPATH=${api_client_path} -export LC_ALL=`cat /etc/default/locale | grep "LANG=" | cut -d= -f2` +export LC_ALL=`cat /etc/default/locale | grep "LANG=" | cut -d= -f2 | tr -d "\n\""` # Note the -u when calling python! we need it to get unbuffered binary stdout and stderr exec python -u ${media_monitor_path}${media_monitor_script} > /var/log/airtime/media-monitor/py-interpreter.log 2>&1