Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failed to tail unicode file #19

Open
williampeking opened this issue Mar 10, 2021 · 1 comment
Open

failed to tail unicode file #19

williampeking opened this issue Mar 10, 2021 · 1 comment

Comments

@williampeking
Copy link

Hi, when i use pytailer to tail some unicode files (e.g. files incluing chinese characters), the program catch the UnicodeDecodeError saying that:
" 'utf-8' codec can't decode byte 0x9b in position 0: invalid start byte. ". I supposed that it is because the python file.read take bytes size as attribute and return str, where it may cut some 3-bytes utf-8 characters into two parts. I try to fix this problem by reading all files as binary and some other modifications. For now, it works. If you are interested, I would glad to make a contribution to this tool to help others.

@arcivanov
Copy link

Same here with Python 3.11b3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants