rtts / djhtml

Django/Jinja template indenter
GNU General Public License v3.0
572 stars 32 forks source link

Charset error with fontello / emoji scss file #72

Closed GitRon closed 1 year ago

GitRon commented 1 year ago

Hi @JaapJoris

I run your linter against some old code base having a fontello SCSS file.

It fails with:

Error: 'charmap' codec can't decode byte 0x81 in position 1940: character maps to

I can't attach the file here, so I try to paste a relevant part of it here:


.icon-x-alarm:before { content: '\e800'; } /* '' */
.icon-x-align-center:before { content: '\e801'; } /* '' */

grafik

The file is formatted as UTF-8.

I just excluded this file but maybe worth looking into...

Thx! Ronny

JaapJoris commented 1 year ago

This looks suspiciously much like #68. Could you try setting the environment variable PYTHONUTF8 to 1 to see if that fixes it? Also see https://docs.python.org/3/library/os.html#utf8-mode

GitRon commented 1 year ago

Awesome, that worked! Thx a lot!

GitRon commented 1 year ago

Maybe worth putting in your docs? 🤔