joeyespo / grip

Preview GitHub README.md files locally before committing them.
MIT License
6.42k stars 423 forks source link

Encode output HTML as 'utf-8' when writing to stdout. #296

Closed ghuls closed 5 years ago

ghuls commented 5 years ago

Encode HTML output as 'utf-8' when writing to stdout, so grip works also in case LANG=C or other non-UTF-8 LANG settings.

ghuls commented 5 years ago

I noticed this problem when grip was called from inside Apache2, in which case LANG was not set.

ghuls commented 5 years ago

Only seems to work for python2.

So the only solution seems to be to set LANG=C.UTF-8 anyway.