mirror of
https://github.com/libretro/Lakka-LibreELEC.git
synced 2024-11-25 08:26:18 +00:00
a963782b40
Normally locale addon must be installed but users don't know that. Simplify this with adding default C.UTF-8 locale in image. Users can still install addon to use some other locale. fixes Python3 error UnicodeEncodeError: 'ascii' codec can't encode characters in position 40-41: ordinal not in range(128) like https://github.com/croneter/PlexKodiConnect/issues/1447 https://forum.libreelec.tv/thread/23116-pvr-recorder-unsuppored-locale/?postID=147453 from Kodi Python before sys.getdefaultencoding(): utf-8 sys.getfilesystemencoding(): ascii after sys.getdefaultencoding(): utf-8 sys.getfilesystemencoding(): utf-8 from SSH console before # locale LANG= 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= after # locale LANG=C.UTF-8 LC_CTYPE="C.UTF-8" LC_NUMERIC="C.UTF-8" LC_TIME="C.UTF-8" LC_COLLATE="C.UTF-8" LC_MONETARY="C.UTF-8" LC_MESSAGES="C.UTF-8" LC_PAPER="C.UTF-8" LC_NAME="C.UTF-8" LC_ADDRESS="C.UTF-8" LC_TELEPHONE="C.UTF-8" LC_MEASUREMENT="C.UTF-8" LC_IDENTIFICATION="C.UTF-8" LC_ALL=
18 lines
484 B
Desktop File
18 lines
484 B
Desktop File
[Unit]
|
|
Description=Compile locale definition files
|
|
ConditionPathExists=!/storage/.cache/locpath
|
|
ConditionPathExists=!/storage/.kodi/addons/service.locale/locpath
|
|
Before=kodi.service
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
Environment=HOME=/storage
|
|
Environment=I18NPATH=/usr/share/i18n
|
|
ExecStartPre=/bin/mkdir /storage/.cache/locpath
|
|
ExecStart=/usr/bin/localedef --quiet -i POSIX -f UTF-8 /storage/.cache/locpath/C.UTF-8
|
|
SuccessExitStatus=0 1
|
|
RemainAfterExit=yes
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|