I am using Ruby 1.8. It seems that downcase
does not alter non-latin characters. For example:
"Δ".downcase
returns "Δ"
I know that in Ruby 1.9.1 and later, I can use Unicode Utils
(from here). I have tried it and it works ok. Returns "δ"
for the previous example.
Is there an equivalent (or any) solution for 1.8 Ruby?
nash@nash:~$ ruby -v
ruby 1.8.7 (2011-02-18 patchlevel 334) [i686-linux]
gem install unicode
(https://rubygems.org/gems/unicode)
require 'unicode'
$KCODE = 'u'
p Unicode::downcase "Δ" #=> "δ"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With