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

Doesn't detect UTF-16 files without BOM. #141

Open
art-solopov opened this issue Feb 20, 2019 · 0 comments
Open

Doesn't detect UTF-16 files without BOM. #141

art-solopov opened this issue Feb 20, 2019 · 0 comments

Comments

@art-solopov
Copy link

I have this file. I produced it by converting some UTF-8 text to UTF-16LE via iconv, which doesn't produce a BOM. When I try to detect its encoding, I get this:

>>> CharlockHolmes::EncodingDetector.detect File.read('text_without_bom.txt')
=> {:type=>:binary, :confidence=>100}

What I'd like to see is the actual UTF-16LE encoding.

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

1 participant