On Tue, 2007-04-10 at 19:53 +1000, Malcolm Tredinnick wrote:
> On Tue, 2007-04-10 at 10:02 +0200, Gábor Farkas wrote:
> > hi,
> > 
> > i've been reading http://code.djangoproject.com/wiki/StringEncoding,
> > 
> > and the idea seems to be, that for "Passing Strings Between Django and 
> > the Developer's Code",
> > 
> > django will/should accept both utf-8 encoded byte-strings, and 
> > unicode-strings.
> > 
> > wouldn't it be simpler to only accept unicode-strings?
> 
> Simpler on one level (inside Django), much, much harder for simple cases
> for developers.
> 
> > 
> > or in other words: in which situations is it better, to also accept 
> > utf-8 bytestrings?
> > 
> > for me it seems much more clean/strict/explicit/pythonic to assume that 
> > all such strings are unicode.
> 
> It's a much tougher requirement on the developer. They have to change
> every piece of their code.

Okay, massive over-statement by me, there :-(

The idea is to make this as transparent as possible for developers. If
they already have code that passes bytestrings to Django, it will
continue to work in a no more broken fashion than before (and if the
bytestrings are UTF-8, in a better fashion). I'm trying to make the
"unicode aware" not "only able to understand unicode". I really do think
this is a goal worth aiming for. We bear the pain inside Django to make
the third-party developer's life easier.

Regards,
Malcolm



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" 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/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to