This means that Python accepts locales with "UTF-8" specification but not without.
I am not a locale expert so I do not know what really needs to get fixed in Python or in Ubuntu's locales, but a workaround in system-config-printer by surrounding locale.setlocale() with "try: ... except: ..." could solve the problem. Tim, WDYT?
For me it looks like this is a problem of Python. I can reproduce the error by directly calling Python:
till@till:~$ LC_ALL=C python -c 'import locale; print locale.setlocale (locale.LC_ALL, "")' python2. 7/locale. py", line 531, in setlocale category, locale) python2. 7/locale. py", line 531, in setlocale category, locale)
C
till@till:~$ LC_ALL=en_US.UTF-8 python -c 'import locale; print locale.setlocale (locale.LC_ALL, "")'
en_US.UTF-8
till@till:~$ LC_ALL=de_DE.UTF-8 python -c 'import locale; print locale.setlocale (locale.LC_ALL, "")'
de_DE.UTF-8
till@till:~$ LC_ALL=en_US python -c 'import locale; print locale.setlocale (locale.LC_ALL, "")'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/
return _setlocale(
locale.Error: unsupported locale setting
till@till:~$ LC_ALL=de_DE python -c 'import locale; print locale.setlocale (locale.LC_ALL, "")'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/
return _setlocale(
locale.Error: unsupported locale setting
till@till:~$
This means that Python accepts locales with "UTF-8" specification but not without.
I am not a locale expert so I do not know what really needs to get fixed in Python or in Ubuntu's locales, but a workaround in system- config- printer by surrounding locale.setlocale() with "try: ... except: ..." could solve the problem. Tim, WDYT?