Malcolm Tredinnick wrote:
> On Wed, 2006-08-09 at 21:51 +0200, gabor wrote:
> [...]
>> phew... the immortal 
>> how-tolerant-we-should-be-when-doing-unicode-conversion problems :-)
> 
> Agreed. This is much easier on my side of the fence (lobbing problems),
> than your side (solving them).
> [...]
> All that being said, you could start off implementing your list and go
> from there (although surely utf-8 decoding will also handle ASCII
> strings, so you could skip the first step).

These would be good rules to follow:

- use unicode objects internally, weed out encoded bytestrings.

- decode all loaded files and configuration into unicode; templates will 
be challenging.

- initially at least, add assertions enforcing the use of unicode 
parameters (crash when you see a bytestring being passed into unicode 
aware code or across applications)

- default encode to utf8 at server boundaries, modulo what Malcolm said 
about honoring charsets served out.

- default de/encode in and out of utf8 for storage inside databases; it 
might be not possible and it might require a declaration in settings.

- have the admin app strip out cp1252 to deal with cut and paste from 
windows; effbot has a dictionary that can be used for this.

cheers
Bill





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

Reply via email to