On 5/30/21 2:44 PM, Jeff King wrote:
Yeah, I'm not sure how such a check would be done. On most Linux systems I've seen, $LANG will mention "en_US.UTF-8" or similar. But I've no idea how portable that convention is, not to mention that people may have more complex setups anyway (e.g., not setting $LANG but setting some of LC_*).
When 'locale charmap' prints 'UTF-8' the terminal can be assumed to be able to accept UTF-8 characters.
'locale charmap', I think, determines this only based on environment variables.
Yuri