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

[bug] Missing characters character on windows #11

Open
stallman-cui opened this issue Apr 12, 2017 · 1 comment
Open

[bug] Missing characters character on windows #11

stallman-cui opened this issue Apr 12, 2017 · 1 comment

Comments

@stallman-cui
Copy link

stallman-cui commented Apr 12, 2017

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

@six8
Copy link
Owner

six8 commented Mar 20, 2018

This is probably an issue with line endings. Windows normally uses \r\n and Linux uses \n. Will need to modify this so it supports either.

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