Textualize / rich-cli

Rich-cli is a command line toolbox for fancy output in the terminal
https://www.textualize.io
MIT License
2.99k stars 77 forks source link

unable to read %FILENAME%: 'charmap' codec can't decode byte %BYTE% in position %POSITION%: character maps to <undefined> #55

Closed SomwareHR closed 2 years ago

SomwareHR commented 2 years ago

Hi,

Environment

Problem

Rich-cli is throwing an error when trying to display UTF-8 encoded files:

unable to read %FILENAME%: 'charmap' codec can't decode byte %BYTE% in position %POSITION%: character maps to <undefined>

Image

image

Explanation

If a source file to be displayed contains ASCII encoded characters qweqwe asdasd everything is fine

If a source file to be displayed contains UTF8 encoded characters šđčćž ŠĐČĆŽ error occurs.

Misc

Question

Can rich display UTF8 files?