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

[Fixes #2345] Quick fix for handling files with BOMs in them. #2353

Merged
merged 1 commit into from
Nov 29, 2018
Merged

[Fixes #2345] Quick fix for handling files with BOMs in them. #2353

merged 1 commit into from
Nov 29, 2018

Conversation

acattaneo88
Copy link

@acattaneo88 acattaneo88 commented Nov 6, 2018

Fixes #2345

I've got the idea here. I've run some tests with differently encoded files (clean, UTF-8, UTF-16 LE, and UTF-16 BE) and everything seems to work correctly.

The linked page and the comments in the code should be self-explanatory.
I don't know how solid this is, but I think it simple and stable enough to be easily merged into the main develop branch.

Also, this is my first PR... :-)

@acattaneo88 acattaneo88 changed the title [Issue #2345] Quick fix for handling files with BOMs in them. [Fixes #2345] Quick fix for handling files with BOMs in them. Nov 6, 2018
@Dunbaratu Dunbaratu merged commit 900bc4d into KSP-KOS:develop Nov 29, 2018
@Dunbaratu
Copy link
Member

I'm de-merging this and putting develop back where it was, and re-opening this issue.
This fix broke KSM files because it applied the change to ALL file reads, even the ones that need to read raw bytes as-is.
The fix has to happen at a "later" time during the reading procress, after it has been determined that the file is plain text and not binary.

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

Successfully merging this pull request may close these issues.

2 participants