Forum: Ruby "ñáéíóúàèìòù".upcase => " ñáéíóúàèìòù" ¿?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
0f1f17ba297242e9d3c86d4cc0a6ea85?d=identicon&s=25 Iñaki Baz Castillo (Guest)
on 2009-04-04 00:06
(Received via mailing list)
"ñáéíóúàèìòù".upcase
=> "ñáéíóúàèìòù"

Shouldn't String#upcase also upcase letters others than those from 'a'
to
'z'?:

"ñáéíóúàèìòù".upcase
=> "ÑÁÉÍÓÚÀÈÌÒÙ"
D68c97e8e2f1653b54c24493caf236ae?d=identicon&s=25 Stephen Celis (Guest)
on 2009-04-04 00:40
(Received via mailing list)
Hi,

On Apr 3, 2009, at 5:05 PM, Iñaki Baz Castillo wrote:

> "ñáéíóúàèìòù".upcase
> => "ñáéíóúàèìòù"
>
> Shouldn't String#upcase also upcase letters others than those from
> 'a' to
> 'z'?:

To upcase beyond ASCII, try the Unicode gem:

% gem install unicode

 >> require "rubygems"
=> true
 >> require "unicode"
=> true
 >> puts Unicode.upcase("ñáéíóúàèìòù")
ÑÁÉÍÓÚÀÈÌÒÙ

Stephen
0f1f17ba297242e9d3c86d4cc0a6ea85?d=identicon&s=25 Iñaki Baz Castillo (Guest)
on 2009-04-04 00:54
(Received via mailing list)
El Sábado 04 Abril 2009, Stephen Celis
escribió:> To upcase beyond ASCII, try the Unicode gem:
>
>  >> puts Unicode.upcase("ñáéíóúàèìòù")
>
> ÑÁÉÍÓÚÀÈÌÒÙ


Great, thanks a lot.
0f1f17ba297242e9d3c86d4cc0a6ea85?d=identicon&s=25 Iñaki Baz Castillo (Guest)
on 2009-04-04 00:55
(Received via mailing list)
El Sábado 04 Abril 2009, Stephen Celis
escribió:> To upcase beyond ASCII, try the Unicode gem:
>
> % gem install unicode

Unfortunatelly this gem doesn't install on Ruby 1.9.
It uses:
  struct RString->ptr
which is not valid in Ruby1.9.
E16e84e861c1815ce11ba7bd851c857d?d=identicon&s=25 lasitha (Guest)
on 2009-04-07 20:10
(Received via mailing list)
On Sat, Apr 4, 2009 at 4:24 AM, Iñaki Baz Castillo <ibc@aliax.net> wrote:
> El Sábado 04 Abril 2009, Stephen Celis escribió:
>>
>> On Apr 3, 2009, at 5:05 PM, Iñaki Baz Castillo wrote:
>> > "ñáéíóúàèìòù".upcase
>> > => "ñáéíóúàèìòù"
>> >
>>
>> To upcase beyond ASCII, try the Unicode gem:
>> % gem install unicode
>
> Unfortunatelly this gem doesn't install on Ruby 1.9.

http://github.com/lang/unicode_utils

solidarity,
lasitha
This topic is locked and can not be replied to.