You may also want to make sure that you know whether your Flash/
ActionScript components require UTF-8 with BOM (Byte-order Mark) or
not.
Let me try to explain more clearly:
In my case, I had i18n problems when a flash component rendered my
utf-8 encoded templates.
I had saved my templates as utf-8, had set the response headers as:
response = HttpResponse(mimetype='text/xml; charset=utf-8')
Nevertheless all of the characters that are out of ascii range were
not displayed correctly.
It turned out to be that my text editor (TextMate) was saving the file
as UTF-8 without BOM for some good reasons.
(http://blog.macromates.com/2005/handling-encodings-utf-8/)
And the flash component required UTF-8 with BOM in order to display
correctly.
So I had to save my xml templates in an other text editor.
Regards,
Polat Tuzla
On Jan 21, 1:55 pm, Anders <[email protected]> wrote:
> My django site uses iso-8859-1 as default output of all the web pages
> (due to ssi intergration with other iso-8859-1 pages).
>
> So I have set:
> DEFAULT_CHARSET = 'iso-8859-1'
> FILE_CHARSET = 'iso-8859-1'
>
> and this works fine for alle the pages I serve.
>
> But now I have to serve an xml output for use with actionscript in a
> Flash. This xml should be UTF-8 encoded.
>
> Is there som way I can convert the queryset to utf-8 so that this will
> work? Or can I convert each string as I output it in the template
> (yeah, I use the template to create xml - not good, I know).
>
> In addition the render_to_response uses the default charset, is is
> possible to override this default and use UTF-8?
>
> Thnx
> Anders
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" 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-users?hl=en
-~----------~----~----~----~------~----~------~--~---