Hi all,

I've been working on a django application which has to support unicode
pretty much all the way through.  We have to support multiple unicode
scripts in the rendering of pages, in form submission, database layer,
even URLs.

>From my somewhat poor research for the last couple of weeks, the
generally accepted strategy I should take is make everything unicode
internally and convert to some encoding on the way out.

For maximum compatibility, we've set our content-type headers to have
charset=utf-8 and I've tried to patch as much of django as possible in
this changeset:

http://code.djangoproject.com/ticket/2588

I was wondering if anyone else is using Django to handle a
multi-language site - and what people thought of getting Django to use
unicode strings everywhere.

My patches basically amount to replacing str() with unicode(),
changing the location of unicode->charset encoding to django.http and
enabling unicode URLs and unicode regular expression matching on URLs.

The big issue I can imagine is that not all databases always support
unicode, and even if they do - they may not be UTF8/16/32 so not all
codepoints could be properly represented in the database so some tests
could potentially fail when trying to read/write to the disk.

So is it a possibility to change all internal string representations
to unicode and convert to a local character set at the HTTP level?
Anyone know of any other potential problems with just dropping plain
python strings?

vic

-- 
"Never attribute to malice that which can be adequately explained by
stupidity."  - Hanlon's Razor

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

Reply via email to