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

Add string encoding IBM720 alias CP720 since 3.0.0 #2608

Merged
merged 1 commit into from
Sep 27, 2021

Conversation

ima1zumi
Copy link
Contributor

Ruby 3.0 から追加された Encoding::CP720 の説明を追加します。

irb(main):002:0> RUBY_VERSION
=> "3.0.2"
irb(main):001:0> 'ب'.encode(Encoding::CP720)
=> "\xA0"
irb(main):001:0> RUBY_VERSION
=> "2.7.4"
irb(main):002:0> 'ب'.encode(Encoding::CP720)
Traceback (most recent call last):
        4: from /Users/mi/.asdf/installs/ruby/2.7.4/bin/irb:23:in `<main>'
        3: from /Users/mi/.asdf/installs/ruby/2.7.4/bin/irb:23:in `load'
        2: from /Users/mi/.asdf/installs/ruby/2.7.4/lib/ruby/gems/2.7.0/gems/irb-1.2.6/exe/irb:11:in `<top (required)>'
        1: from (irb):2
NameError (uninitialized constant Encoding::CP720)
Did you mean?  Encoding::CP1250

ref: #2458
ref: https://bugs.ruby-lang.org/issues/16233
ref: https://en.wikipedia.org/wiki/Code_page_720

@znz znz merged commit f7ac9d2 into rurema:master Sep 27, 2021
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