On Fri, Jun 12, 2009 at 8:27 PM, blackthorne<francisco....@gmail.com> wrote: > > I'm trying to display text in a page using an universal encoding such > as UTF-8. > Here is an example: > return dict(message=u'Castro de Avelãs') > > in the view I have: > > <html><head> > <meta http-equiv="content-type" content="text/html; charset=utf-8" /> > </head> > ... > {{=message}} > ... > > It doesn't work... I don't get the 'ã' or I get it messed up if I do > message='Castro de Avelãs' > > I know for a fact that the problem is not related to the browser and > it's not on the view side because it works fine if I hardcode it (as > in put that string in the html template). > > Thank you
I had this problem with some browsers (they have a default value to character encoding and force it instead of value you pass in HTML). Try to change content-type header inserting charset: response.headers['Content-Type'] = "text/html;charset=utf-8" -- Álvaro Justen Peta5 - Telecomunicações e Software Livre 21 3021-6001 / 9898-0141 http://www.peta5.com.br/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---