|
Re: ActiveSupport::Multibyte for better Unicode support: msg#00154lang.ruby.rails.core
Peter, The problems is correctly supporting multibyte strings. Unicode, the most complete character set, has several encodings (UTF-8 being the most popular one), each of them having some (or all) characters expressed with two or more bytes (unlike ASCII, for instance). In UTF-8, "abc" is a three-character string encoded in 3 bytes, but "čžš" (3 characters from Croatian alphabet) are encoded in 6 bytes (2 bytes each). Multibyte-unaware programming languages (like Ruby and PHP < 6) assume 1 character = 1 byte. In Ruby, try string.reverse or string.length on strings containing special characters to see some unexpected results. Reverse will corrupt the string while length will report in bytes, not in characters. These are trivial examples, while the problem goes much deeper. Rails needs this. -- Mislav On 9/23/06, Peter Michaux <petermichaux@xxxxxxxxx> wrote:
I'm interested in a general overview on what problem it fixes and why --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@xxxxxxxxxxxxxxxx To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@xxxxxxxxxxxxxxxx For more options, visit this group at http://groups.google.com/group/rubyonrails-core -~----------~----~----~----~------~----~------~--~---
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: bug in routes ???, Greg Hauptmann |
|---|---|
| Next by Date: | Re: ActiveSupport::Multibyte for better Unicode support, Charles O Nutter |
| Previous by Thread: | Re: ActiveSupport::Multibyte for better Unicode support, Mathieu Jobin |
| Next by Thread: | Re: ActiveSupport::Multibyte for better Unicode support, Pete Yandell |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |