Skip to content

[bug] Missing characters character on windows #11

@stallman-cui

Description

@stallman-cui

Hi, thank you, when i use this on windows, it does not work like normal, may be a bug
OS: windows 7
OS default coding: koi8-r
test file: test.log, this log just have two words, and no line breaks
content: test result
expect: test result
but result is: test resul

after read the source code, i found this is a bug when it work on windows
image
When i update this line

data = self.fp.read(end_pos - self.fp.tell() - 1)

to

data = self.fp.read(end_pos - self.fp.tell())

it works like expect

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