We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
headius
Learn more about funding links in repositories.
Report abuse
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
On many versions of JRuby, including 9.1.8.0:
"\x80".force_encoding("WINDOWS-1252").codepoints.first # => 0x80
I expected 0x20AC: https://en.wikipedia.org/wiki/Windows-1252
See: https://github.com/jruby/jruby/blob/9.1.8.0/core/src/main/java/org/jruby/RubyString.java#L5117-L5118 https://github.com/jruby/jruby/blob/9.1.8.0/core/src/main/java/org/jruby/util/StringSupport.java#L1473
The text was updated successfully, but these errors were encountered:
We behave like MRI does here, so I'd be reluctant to change it.
$ rvm ruby-2.4 do ruby -e 'p "\x80".force_encoding("WINDOWS-1252").codepoints.first.to_s(16)' "80"
If you believe this is wrong, I think you should take it up with them on their bug tracker first.
Sorry, something went wrong.
Ok: https://bugs.ruby-lang.org/issues/13321
I'ts an issue with codepoints method ifself or jcodings ?
@headius: that's expected behavior over there! https://bugs.ruby-lang.org/projects/ruby-trunk/repository/revisions/58000/diff
No branches or pull requests
On many versions of JRuby, including 9.1.8.0:
I expected 0x20AC: https://en.wikipedia.org/wiki/Windows-1252
See:
https://github.com/jruby/jruby/blob/9.1.8.0/core/src/main/java/org/jruby/RubyString.java#L5117-L5118
https://github.com/jruby/jruby/blob/9.1.8.0/core/src/main/java/org/jruby/util/StringSupport.java#L1473
The text was updated successfully, but these errors were encountered: