Hi Achipa,
On Nov 30, 2:03 pm, achipa <[EMAIL PROTECTED]> wrote: > The idea of unicode is not to care about encodings, a ж should be a ж > no matter what is ithe underlying encoding, utf8, cp1251 or anything > else capable of actually displaying that glyph. This is where people > start mixing the terms unicode and, say, utf-8. IS_URL should > certainly have unicode as the parameter, however, here lies the > dilemma - if you pass validation (as an escaped unicode object), IMHO > you should insert *that*, escaped, RFC compliant unicode string into > the database, and not the 'pretty' utf8 one. This is what I'm talking > about when saying helpers beign smart enough to help human-friendly > use and display, but to remain standards compliant in the process. I > hope I make sense as it's a pretty convoluted topic, encodings are > known to cause serious headache on exposure :) I understand what you mean, and you're making sense. Fortunately, the way validators works makes this easy to implement. In fact, doing what you're suggesting is already part of my suggestion for unicode_to_latin (). When you execute a validator, it potentially changes the input string. So for example: IS_URL(some_valid_unicode_url) => returns => (latin_character_set_string, None) IS_URL(invalid_unicode_url) => returns => (invalid_unicode_url, error_message) So if you use IS_URL as your validator for database input, it *is* a latin string that will actually be stored in the database. Would anyone find this kind of program behaviour harmful or annoying? Thanks, --Jonathan --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---

