By using ‘sudo dpkg-reconfigure locales’, I have set locale
to the ‘hr_HR.UTF-8’ on both operating systems. On osmc (Pi 2)
locale command returns:
osmc@osmc:~$locale
LANG=hr_HR.UTF-8
LANGUAGE=
LC_CTYPE=“hr_HR.UTF-8”
LC_NUMERIC=“hr_HR.UTF-8”
LC_TIME=“hr_HR.UTF-8”
LC_COLLATE=“hr_HR.UTF-8”
LC_MONETARY=“hr_HR.UTF-8”
LC_MESSAGES=“hr_HR.UTF-8”
LC_PAPER=“hr_HR.UTF-8”
LC_NAME=“hr_HR.UTF-8”
LC_ADDRESS=“hr_HR.UTF-8”
LC_TELEPHONE=“hr_HR.UTF-8”
LC_MEASUREMENT=“hr_HR.UTF-8”
LC_IDENTIFICATION=“hr_HR.UTF-8”
LC_ALL=
In python3:
sys.getfilesystemencoding()
‘utf-8’
The same setup on raspbmc (Pi B) returns:
pi@raspbmc:~$ locale
LANG=
LANGUAGE=
LC_CTYPE=“POSIX”
LC_NUMERIC=“POSIX”
LC_TIME=“POSIX”
LC_COLLATE=“POSIX”
LC_MONETARY=“POSIX”
LC_MESSAGES=“POSIX”
LC_PAPER=“POSIX”
LC_NAME=“POSIX”
LC_ADDRESS=“POSIX”
LC_TELEPHONE=“POSIX”
LC_MEASUREMENT=“POSIX”
LC_IDENTIFICATION=“POSIX”
LC_ALL=
In python3:
sys.getfilesystemencoding()
‘ascii’
I have a python3 script that works with no problems on osmc
or windows, but due to the locale setup, not at all, on raspbmc.
How to setup locale on raspbmc to be the same as osmc?