Michael Radziej wrote:
> gettext('blablabla %s blablalba') % \
> "utf8 bytestring with funny รครค chars"
>
> If gettext returned unicode, python would decode the utf8 encoded
> bytestring, again using ASCII as default encoding -> exception galore ;-)
I believe we should teach people to start using u'..' in their code. I
even think we'll be forced to do it because this situation will become
common everywhere inside Django, not only with gettext because we will
have all database contents exposed in unicode be default:
error_str = 'Value "%s" is incorrect' % obj.value
("obj" being a model instance). This is the same thing. I think we will
have this painful period until people will fix their code with stating
explicit source encoding and prepending "u" before strings.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---