Unknown Locale: UTF-8 #416

Open
opened 2018-01-27 16:15:49 +01:00 by 42yeah · 2 comments
42yeah commented 2018-01-27 16:15:49 +01:00 (Migrated from github.com)
  File "/Users/apple/Library/Python/2.7/bin/powerline-config", line 6, in <module>
    from powerline.commands.config import get_argparser
  File "/Users/apple/Library/Python/2.7/lib/python/site-packages/powerline/commands/config.py", line 6, in <module>
    import powerline.bindings.config as config
  File "/Users/apple/Library/Python/2.7/lib/python/site-packages/powerline/bindings/config.py", line 19, in <module>
    from powerline.commands.main import finish_args
  File "/Users/apple/Library/Python/2.7/lib/python/site-packages/powerline/commands/main.py", line 18, in <module>
    encoding = get_preferred_arguments_encoding()
  File "/Users/apple/Library/Python/2.7/lib/python/site-packages/powerline/lib/encoding.py", line 89, in get_preferred_arguments_encoding
    locale.getdefaultlocale()[1]
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py", line 543, in getdefaultlocale
    return _parse_localename(localename)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py", line 475, in _parse_localename
    raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: UTF-8
Traceback (most recent call last):
  File "/Users/apple/Library/Python/2.7/bin/powerline-config", line 6, in <module>
    from powerline.commands.config import get_argparser
  File "/Users/apple/Library/Python/2.7/lib/python/site-packages/powerline/commands/config.py", line 6, in <module>
    import powerline.bindings.config as config
  File "/Users/apple/Library/Python/2.7/lib/python/site-packages/powerline/bindings/config.py", line 19, in <module>
    from powerline.commands.main import finish_args
  File "/Users/apple/Library/Python/2.7/lib/python/site-packages/powerline/commands/main.py", line 18, in <module>
    encoding = get_preferred_arguments_encoding()
  File "/Users/apple/Library/Python/2.7/lib/python/site-packages/powerline/lib/encoding.py", line 89, in get_preferred_arguments_encoding
    locale.getdefaultlocale()[1]
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py", line 543, in getdefaultlocale
    return _parse_localename(localename)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py", line 475, in _parse_localename
    raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: UTF-8

This is what I get when starting CRT...
OS: Mac OS X
Language: Chinese

```Traceback (most recent call last): File "/Users/apple/Library/Python/2.7/bin/powerline-config", line 6, in <module> from powerline.commands.config import get_argparser File "/Users/apple/Library/Python/2.7/lib/python/site-packages/powerline/commands/config.py", line 6, in <module> import powerline.bindings.config as config File "/Users/apple/Library/Python/2.7/lib/python/site-packages/powerline/bindings/config.py", line 19, in <module> from powerline.commands.main import finish_args File "/Users/apple/Library/Python/2.7/lib/python/site-packages/powerline/commands/main.py", line 18, in <module> encoding = get_preferred_arguments_encoding() File "/Users/apple/Library/Python/2.7/lib/python/site-packages/powerline/lib/encoding.py", line 89, in get_preferred_arguments_encoding locale.getdefaultlocale()[1] File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py", line 543, in getdefaultlocale return _parse_localename(localename) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py", line 475, in _parse_localename raise ValueError, 'unknown locale: %s' % localename ValueError: unknown locale: UTF-8 Traceback (most recent call last): File "/Users/apple/Library/Python/2.7/bin/powerline-config", line 6, in <module> from powerline.commands.config import get_argparser File "/Users/apple/Library/Python/2.7/lib/python/site-packages/powerline/commands/config.py", line 6, in <module> import powerline.bindings.config as config File "/Users/apple/Library/Python/2.7/lib/python/site-packages/powerline/bindings/config.py", line 19, in <module> from powerline.commands.main import finish_args File "/Users/apple/Library/Python/2.7/lib/python/site-packages/powerline/commands/main.py", line 18, in <module> encoding = get_preferred_arguments_encoding() File "/Users/apple/Library/Python/2.7/lib/python/site-packages/powerline/lib/encoding.py", line 89, in get_preferred_arguments_encoding locale.getdefaultlocale()[1] File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py", line 543, in getdefaultlocale return _parse_localename(localename) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py", line 475, in _parse_localename raise ValueError, 'unknown locale: %s' % localename ValueError: unknown locale: UTF-8 ``` This is what I get when starting CRT... OS: Mac OS X Language: Chinese
42yeah commented 2018-01-27 16:26:01 +01:00 (Migrated from github.com)

Looks like it's a problem with Powerline. iTerm does not have this issue, however. Is it because that CRT does not have UTF8 support? Hope it could be fixed soon 😄

Edit: I found that CRT supports UTF8 just now. But why does this message appear?

Looks like it's a problem with Powerline. iTerm does not have this issue, however. Is it because that CRT does not have UTF8 support? Hope it could be fixed soon 😄 Edit: I found that CRT supports UTF8 just now. But why does this message appear?
bmcgough commented 2018-09-19 20:09:09 +02:00 (Migrated from github.com)

I have LC_CTYPE=UTF-8 in my cool-retro-term and am experiencing the following:

-bash: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8)

As well as various Python errors like the one above.

I believe that UTF-8 is not a valid value for LC_CTYPE. It is not a complete locale.

I am on OS X where the terminal app has LANG=en_US.UTF-8. Perhaps there is a way to inherit this?

I have LC_CTYPE=UTF-8 in my cool-retro-term and am experiencing the following: `-bash: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8)` As well as various Python errors like the one above. I believe that `UTF-8` is not a valid value for LC_CTYPE. It is not a complete locale. I am on OS X where the terminal app has LANG=en_US.UTF-8. Perhaps there is a way to inherit this?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: seeseemelk/cool-retro-term#416
No description provided.