Using this alternative works: response.flash = str(T('Song uploaded: %s - %s [%s]')) % (str(audio ["artist"][0]),str(audio["title"][0]),str(audio["album"][0]))
but T([...], dict([...])) doesn't. On Apr 28, 5:28 pm, desfrenes <desfre...@gmail.com> wrote: > Googling for "'ascii' codec can't decode byte 0xc3 in position", I > found that most python framework faced this problem one day or > another:http://blog.codekills.net/archives/38-Encoding-and-Decoding-Text-in-P... > > On Apr 28, 5:02 pm, mdipierro <mdipie...@cs.depaul.edu> wrote: > > > How are you editing the translation strings? Ra eyou doing it via the > > interface? If not mind that translations must be UTF8. > > > On Apr 28, 9:32 am, desfrenes <desfre...@gmail.com> wrote: > > > > Hi, > > > > I'm running trunk version and I get this trace when adding accentued > > > (é) caracters in a translation string: > > > > Traceback (most recent call last): > > > File "C:\Documents and Settings\m_desfresnes\Mes documents\web2py-svn > > > \gluon\restricted.py", line 102, in restricted > > > exec ccode in environment > > > File "C:\Documents and Settings\m_desfresnes\Mes documents\web2py-svn > > > \applications\mychoonz/views/default/upload.html", line 14, in > > > <module> > > > File "C:\Documents and Settings\m_desfresnes\Mes documents\web2py-svn > > > \gluon\globals.py", line 88, in write > > > self.body.write(xmlescape(data)) > > > File "C:\Documents and Settings\m_desfresnes\Mes documents\web2py-svn > > > \gluon\html.py", line 94, in xmlescape > > > return data.xml() > > > File "C:\Documents and Settings\m_desfresnes\Mes documents\web2py-svn > > > \gluon\languages.py", line 69, in xml > > > return cgi.escape(str(self)) > > > File "C:\Documents and Settings\m_desfresnes\Mes documents\web2py-svn > > > \gluon\languages.py", line 66, in __str__ > > > return self.T.translate(self.m,self.s) > > > File "C:\Documents and Settings\m_desfresnes\Mes documents\web2py-svn > > > \gluon\languages.py", line 130, in translate > > > return mt % symbols > > > UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position > > > 13: ordinal not in range(128) > > > > Any idea ? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---