On 12/24/06, Victor Ng <[EMAIL PROTECTED]> wrote:

Sorry for my weird comment on ticket. 2588 - I should have spent more
time discussing what I really meant.

No problem; my inability to understand probably had more to do with my
inexperience with Django than anything else.

I'm not sure why 0x2f would ever be a chinese character.  URLs are
supposed to be encoded as UTF8 as per RFC 2718 and RFC 3986.

...

How are you getting a chinese block character for 0x2f?

It wouldn't and I didn't; that was just a potential problem I was
considering that turned out to not be an issue at all.

If you want to handle 'unicode' URLs, you should assume that the URLs
are UTF8 and decode the path as such.

Yeah, that's what I wound up doing.

http://groups.google.com/group/django-users/browse_thread/thread/52349f0968f5b36b/07adcb5763a09a5a

In my UTF8 decoding middleware layer, I have a little bit of code that
forces the path to be decoded as UTF8, then as latin1 so that i get a
transient unicode string.

I then re-encode the data back to utf8 (since it might have been latin1).

Basically this just makes sure that what comes in HttpRequest objects
is UTF-8 byte strings, right?  I guess you are worried about the
browser using `latin1`?

Aaron

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to