On Oct 2, 2008, at 9:33 PM, Hassan Schroeder wrote:
> It depends on the Web server being able to handle it, but yes, you > can have non-ISO-8859-1 characters in a URL. Hmmm... are you sure? I thought one would need to encode anything but a small subset of US-ASCII: "The generic URI syntax mandates that new URI schemes that provide for the representation of character data in a URI must, in effect, represent characters from the unreserved set without translation, and should convert all other characters to bytes according to UTF-8, and then percent-encode those values." http://en.wikipedia.org/wiki/Percent-encoding "When a new URI scheme defines a component that represents textual data consisting of characters from the Universal Character Set [UCS], the data should first be encoded as octets according to the UTF-8 character encoding [STD63]; then only those octets that do not correspond to characters in the unreserved set should be percent- encoded. For example, the character A would be represented as "A", the character LATIN CAPITAL LETTER A WITH GRAVE would be represented as "%C3%80", and the character KATAKANA LETTER A would be represented as "%E3%82%A2". http://tools.ietf.org/html/rfc3986 In any case, one approach to URL normalization would be to transliterate the path to ASCII, then convert any non-alphanumeric characters into dashes or something, e.g.: €2 commemorative coins -> http://svr225.stepx.com:3388/eur2-commemorative-coins Hernán Cortés -> http://svr225.stepx.com:3388/hernan-cortes Scanian (linguistics) -> http://svr225.stepx.com:3388/scanian-linguistics Scheme (programming language) -> http://svr225.stepx.com:3388/scheme-programming-language Cheers, -- PA. http://alt.textdrive.com/nanoki/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---