babel
babel copied to clipboard
Babel fails to handle C locale properly
The "C" locale is the only one that is guaranteed to be available on all systems, however Babel does not handle it correctly:
13:12:25: File "/home/xxxx/venv/lib/python3.12/site-packages/babel/core.py", line 427, in parse
13:12:25: raise UnknownLocaleError(input_id)
13:12:25: babel.core.UnknownLocaleError: unknown locale 'c'
This is problematic if a python program that uses Babel is running with the C locale set.
Could you show a little more of the traceback?
In particular, is this program passing in an explicit locale, or is it trying to use Babel's default locale (which could indeed have been read to be C from the environment)?