On 12/23/06, Aaron Jacobs <[EMAIL PROTECTED]> wrote: ...
after reading a bit about UTF-8, it sounds like `0x2F` is never used in anything but the forward slash.
Yep. If you haven't seen it, Wikipedia has excellent coverage of unicode, including utf-8: http://en.wikipedia.org/wiki/Utf-8 Even so, rfc 3926 (covering URIs) 1.2.1: " Percent-encoded octets (Section 2.1) may be used within a URI to represent characters outside the range of the US-ASCII coded character set if this representation is allowed by the scheme or by the protocol element in which the URI is referenced. Such a definition should specify the character encoding used to map those characters to octets prior to being percent-encoded for the URI. " While rfc 2616 (covering http 1.1) 3.2.3 says only: " Characters other than those in the "reserved" and "unsafe" sets (see RFC 2396 [42]) are equivalent to their ""%" HEX HEX" encoding. " Which basically means that the character encoding used in octet encoding for http URIs is undefined. ...In the real world, I've only ever seen characters encoded as utf-8 octets.
Now my issue switches to the analogous one for the model layer. It seems that SQLite, at least, works fine with the UTF-8 byte strings Django gives it, and faithfully returns them when asked. But again, one has to worry about remembering to decode them into Unicode strings when needed, which is a bit annoying. And of course you have to remember to make your database fields three or four times longer than needed, since each character takes up three or four bytes.
There's been a general consensus that unicodifying Django is a worthy goal, and I know some work's been done on it, though I don't see a branch for it. These tickets deal with unicode to the DB. http://code.djangoproject.com/ticket/952 http://code.djangoproject.com/ticket/3115 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---