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

Unicode BOM support ? #107

Closed
ronanM opened this issue Feb 10, 2017 · 1 comment
Closed

Unicode BOM support ? #107

ronanM opened this issue Feb 10, 2017 · 1 comment

Comments

@ronanM
Copy link
Contributor

ronanM commented Feb 10, 2017

https://en.wikipedia.org/wiki/Byte_order_mark

better.files.File#lines seems to not support BOM.

@pathikrit
Copy link
Owner

pathikrit commented Feb 10, 2017

Hi, better-files just calls java.nio.file.Files.readAllLines - so its not really a bug in this library but in Java itself. They decided to not fix the issue in JDK-4508058

I plan to address this in better-files by introducing a default better-file's Unicode charset that detects and skips BOMs (only when reading, it doesnt write BOMs during writes). Users can still use Charset.forName("UTF-8") if they expect BOMs for whatever reason

pathikrit added a commit that referenced this issue Feb 13, 2017
pathikrit added a commit that referenced this issue Feb 13, 2017
pathikrit added a commit that referenced this issue Feb 13, 2017
pathikrit added a commit that referenced this issue Feb 13, 2017
pathikrit added a commit that referenced this issue Feb 14, 2017
pathikrit added a commit that referenced this issue Feb 14, 2017
pathikrit added a commit that referenced this issue Feb 14, 2017
pathikrit added a commit that referenced this issue Feb 14, 2017
pathikrit added a commit that referenced this issue Feb 14, 2017
pathikrit added a commit that referenced this issue Feb 14, 2017
pathikrit added a commit that referenced this issue Feb 14, 2017
Fix #107: Support encoding/decoding of Unicode byte-order markers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants