On Tue, 2007-04-10 at 12:13 +0200, Michael Radziej wrote:
> Hi Malcolm,
> 
> Malcolm Tredinnick wrote:
> > It's a much tougher requirement on the developer. They have to change
> > every piece of their code. Instead, we can accept UTF-8 bytestrings or
> > unicode strings and large amounts of code will work unchanged.
> > 
> > There aren't actually that many places where strings go back and forth
> > between Django and the developers code, so doing the conversion to
> > Unicode, if necessary, at the Django interface isn't appearing to be
> > that hard.
> 
> I'm not sure if this makes it really easier for the developers.
> 
> If I understand you correctly, the developer gets back unicode strings
> in any case from Django. But as soon as the developer compares the
> unicode string to something else from his/her own code,  or appends
> strings, or uses any of the other various python operators that
> implicitly convert in mixed unicode/bytestring operation, the operation
> will surprisingly fail when there's a non-ASCII character in the
> developer's bytestring.
> 
> Though, I'm still not sure whether I really want a unicode-everywhere
> approach ...

Let's not lose too much sleep over this yet, because we can go round and
round in circles playing "what if? maybe?" games on things that aren't
really a big dividing item. I think I'm making progress at the moment
with the dual approach of unicode and UTF-8 bytestrings. I'll get that
done, people can play with it and see what happens. It's not really
making things much harder in the Django codebase.

Of course, anybody who wants to work in a totally unicode string world
can do so under this scheme. Using byte strings isn't compulsory. :-)

What I'd really like from you guys (Michael, Ivan, Gábor -- and anybody
else who wants to play along) is to see how the code fits in with your
existing workflow. What are the bits that are still hard for you? What
are the problems that aren't solved? I'm thinking about things like
Ivan's comment about file encodings when reading the templates. I wasn't
sure if it was an issue or not, Ivan brought it up more or less
immediately, which makes me think it's probably something to attach
slightly more priority to (particularly because it's easy to work with
in that case).

I have a good theoretical understanding of the issues and potential
solutions (or, I like to fool myself that I do), but I'm not a
non-English speaker by default, so you guys have much greater practical
experience and will highlight some things I won't notice. Please do
point them out. Treat me like an idiot in this respect (all my friends
do, you guys shouldn't be any different) -- nothing you do in the real
world is too silly to mention.

We really need an East-Asian user in this loop, too. I have some
experience working in mixed Chinese/English and Japanese/English
workplaces, but nowhere near enough to be an expert on the trickier
problems that might come up.

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