Add LC_CTYPE to environment variables in macOS#9227
Conversation
Some componentes, e.g. tradfri, will not work properly unless LANG is an UTF-8 environment.
|
Does this PR only apply to macOS? |
|
Yes, the |
|
hmm. @balloob ? Is that a good idea to set it fix to |
|
@pvizeli I do not think that it is a good idea to hardcode to |
|
For reference @matemaciek had UTF-8 problems in docker and proposed a fix in python, but later settled on setting locale in the docker script. |
|
We set C.UTF-8 inside docker to fix problem with python. That is a general python problem |
|
macOS doesn't seem to have a If Through trial, googling, and error I could get Home Assistant (and tradfri) to work properly by setting Would it be a better solution to set |
|
Let's start with setting LC_CTYPE to UTF-8 in the plist file. I want to point as many things as possible at UTF-8 as possible and shy away from language specific things like en_US. |
|
Sure thing. Added a new commit, let me know if you need anything else. |
Some componentes, e.g. tradfri, will not work properly unless LANG is an UTF-8 environment. Not sure which locale to choose, went with en_US.UTF-8. Perhaps C.UTF-8 would be a better choice, but I couldn't get that to work properly (only worked from the command line, not as a launch agent).
Edit: changed to set
LC_CTYPEtoUTF-8, see discussion below for details.Description:
Related issue: fixes #9008 for macOS.
Checklist:
Couldn't find anything applicable in the checklist.