Skip to content

Encoding issue #5

@ghost

Description

OS: Windows 10 21H2
Python: Python 3.10.4

Steps:

  • pip install pyquotes

example.py (file is saved as UTF-8 with/without a BOM)

print('こんにちは世界')
  • pyquotes example.py
    return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 11: character maps to <undefined>

If read_text() and write_text() are replaced with read_bytes() and write_bytes() equivalents, the quote processing is fixed (not tested on Linux). Although, additional new lines are erroneously added, I haven't had a chance to look into why.

Thank you for your time, this library has saved my many hours.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions