On Wed, 2006-07-19 at 00:30 +0200, gabor wrote: > questions: > 1. django publishes the whole environ dictionary as request.META. the > environ dictionary is a normal byte-string dictionary. so, should we > convert it to unicode so that the request.META dictionary only contains > unicode strings? > > 1.a: if yes, how? some things like QUERY_STRING and REQUEST_METHOD are > relatively simple how to convert, but what should happen to the other > server-related stuff like HTTP_X_FORWARDED_HOST? should we convert them? > if yes, with what encoding? ascii? iso-8859-1?
Actually, I'd consider this one easy. Well, the first question is easy - the answer is 'yes'. Rationale - The strings in the environment are going to either to be ascii, or not ascii. If they're ascii, the question doesn't arise. If they're not ascii, and assuming that they're not, say, jpegs (I don't know, _someone_ might be using the environment to store binary data) they must be encoded in some sort of character set. And so obviously they're strings, and should be presented to the django programmer in this way. Now, as to _what_ character set to use, that's a harder problem. I'd just decode the entire environment using the same charset and hope, me. tom --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@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-developers -~----------~----~----~----~------~----~------~--~---