tmux-plugins / tmux-cpu

Plug and play cpu percentage and icon indicator for Tmux.
MIT License
426 stars 65 forks source link

Localization issue :: LC_ALL overwrites LANG #50

Closed ms-jpq closed 4 years ago

ms-jpq commented 4 years ago

From the old PR here: https://github.com/tmux-plugins/tmux-cpu/pull/47

we still have issues with localization, mainly that LC_ALL is a commonly exported env variable, and it overwrites LANG.

turns out if you have both variables set (very common), this PR https://github.com/tmux-plugins/tmux-cpu/pull/46 still does not fix the issue

I have attached a photo below that shows the difference

图片

casperdcl commented 4 years ago

turns out if you have both variables set (very common), this PR #46 still does not fix the issue

Not sure I understand. You seem to be saying "if you have both variables set it's broken" but then this PR #50 sets both variables.

ms-jpq commented 4 years ago

oh, I meant like, LC_ALL has higher precedence than LANG, so if you have both set: LANG=C gets overwritten by LC_ALL=<something>, and thats why PR https://github.com/tmux-plugins/tmux-cpu/pull/46 by itself is insufficient.

We need to set LC_ALL inside the script to ensure parsing success