[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

UTF-8 character downcase!!

Igor K.

9/1/2007 10:24:00 AM

Hello,
Who can help me with problem?

I have a word = "Ð?РÐ?Ð?Ð?Т", it's in russian, and i want to downcase this
word(=пÑ?ивеÑ?). But standart method downcase not works with non-english
letters

Thank you for reply
--
Posted via http://www.ruby-....

3 Answers

Josef 'Jupp' Schugt

9/1/2007 12:49:00 PM

0

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ð?Ñ?ивеÑ? Ð?гоÑ? â?º
* Igor K.:
> I have a word = "Ð?РÐ?Ð?Ð?Т", it's in russian, and i want to downcase this
> word(=пÑ?ивеÑ?). But standart method downcase not works with non-english
> letters

Should no tool be available to do downcase, upcase, and the like for
Russian what about implementing it? Doing so is not very complicated.
If you actually intend to do this please support all characters of the
Cyrillic script (quite a number of them is not used in Russian).

The full list of Cyrillic characters and their Unicode code points are
available at Unicode.org

Cyrillic: http://www.unicode.org/charts/PDF...
Cyrillic supplement: http://www.unicode.org/charts/PDF...

IANAL but to my understanding it is perfectly legal to use these sheets
(in contrast to buying high-price standards documents that is) for
implementing a conversion tool.

- From these sheets you can create an array of all lowercase and an array
of all uppercase letters and out of them regular expressions that match
precisely one Cyrillic letter and a hash that maps each lowercase
character onto an uppercase one and one that maps each uppercase
character onto a lowercase one. Should some lowercase or uppercase
character have no counterpart (I am not completely sure if this is the
case or not) simply exclude it.

Consider applying the standard method before applying the abovementioned
mapping.

Hope that helps a bit,

Josef 'Jupp' Schugt
- --
Blog available at http://www.mynetcologne.de/~nc-schu...
PGP key with id 6CC6574F available at http://wwwkeys.d...
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail....

iD8DBQFG2V+yrhv7B2zGV08RAhsIAKC48/AXTo3/qB0vo9l0tMM5su3MRQCZAW3L
uiT9bm6vhi/eN5dKxwHrWPQ=
=1Mdu
-----END PGP SIGNATURE-----

Jimmy Kofler

9/1/2007 1:47:00 PM

0

> UTF-8 character downcase!!
> Posted by Igor K. (demoversion) on 01.09.2007 12:24
> Hello,
> Who can help me with problem?
>
> I have a word = "Ð?РÐ?Ð?Ð?Т", it's in russian, and i want to downcase this
> word(=пÑ?ивеÑ?). But standart method downcase not works with non-english
> letters
>
> Thank you for reply
> Reply with quote


Did you try using the character-encodings gem?

http://rubyforge.org/projects/char-...

http://snippets.dzone.com/posts...
--
Posted via http://www.ruby-....

Igor K.

9/2/2007 9:09:00 AM

0


>> I have a word = "Ð?РÐ?Ð?Ð?Т", it's in russian, and i want to downcase this
>> word(=пÑ?ивеÑ?). But standart method downcase not works with non-english
>> letters
>>
>> Thank you for reply
>> Reply with quote
>
>
> Did you try using the character-encodings gem?
>
> http://rubyforge.org/projects/char-...
>
> http://snippets.dzone.com/posts...

Thank you for reply

But i can't install this plugin on Windows(the problem i think with
command 'make', it's missing on Windows XP, so i can't compile source)

Who knows solution for this problem?

Thanks
--
Posted via http://www.ruby-....