Bug #3376
closedrussian support
Description
=begin
- String#upcase/String#downcase don't work with russian characters
ruby-1.9.2-preview3 > "привет".upcase
=> "привет"
ruby-1.9.2-preview3 > "ПРИВЕТ".downcase
=> "ПРИВЕТ"
- Regex doesn't work with POSIX bracket classes
ruby-1.9.2-preview3 > "привет" =~ /[:alpha:]/
=> nil
It's working with unicode groups
ruby-1.9.2-preview3 > "привет" =~ /\p{L}/
=> 0
- Negated unicode groups don't work
SyntaxError: (irb):13: invalid character property name {L}: /\P{L}/
from /Users/yury/.rvm/rubies/ruby-1.9.2-preview3/bin/irb:17:in `'
=end
Updated by naruse (Yui NARUSE) over 14 years ago
=begin
- String#upcase/String#downcase don't work with russian characters
Ruby's String#upcase is for ASCII.
- Regex doesn't work with POSIX bracket classes
"привет" =~ /[:alpha:]/
"привет" =~ /[[:alpha:]]/ is correct.
- Negated unicode groups don't work
It seems a bug. I'll check it, thanks.
=end
Updated by mame (Yusuke Endoh) over 14 years ago
=begin
Hi,
Thank you for your report.
2010/6/1 Yury Korolev redmine@ruby-lang.org:
- String#upcase/String#downcase don't work with russian characters
This is the spec. Traditionally, they have handled only ASCII characters.
- Regex doesn't work with POSIX bracket classes
ruby-1.9.2-preview3 > "привет" =~ /[:alpha:]/
=> nil
This is also the spec. This spec was changed after 1.9.1.
See NEWS: http://svn.ruby-lang.org/repos/ruby/tags/v1_9_2_preview3/NEWS
The rationale is that many people expects \d and \s to match ASCII only.
- Negated unicode groups don't work
SyntaxError: (irb):13: invalid character property name {L}: /\P{L}/
from /Users/yury/.rvm/rubies/ruby-1.9.2-preview3/bin/irb:17:in `'
This looks like a bug. We'll investivage it. Thanks!
--
Yusuke Endoh mame@tsg.ne.jp
=end
Updated by naruse (Yui NARUSE) over 14 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
=begin
This issue was solved with changeset r28120.
Yury, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
=end
Updated by duerst (Martin Dürst) over 10 years ago
- Related to Feature #10085: Add non-ASCII case conversion to String#upcase/downcase/swapcase/capitalize added