Skip to content

Source text doesn't equal text after encoding and decoding #9

@mikevolgo

Description

@mikevolgo

Hi,

I've found a situation when after encoding and decoding text is not equal to source text. Example

text = 'ABCDEFGHIJKLMNOPQRSTUVWXYZÄÖÑܧ¿abcdefghijklmnopqrstuvwxyzäöñüà'
print(codec.decode(codec.encode(text)) == text)
False
print(codec.decode(codec.encode(text)))
ABCDEFGHIJKLMNOPQRSTUVWXYZÄÖÑܧ¿abcdefghijklmnopqrstuvwxyzäöñüà@

we can see that after encoding/decoding an extra symbol "@" is added.

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