I18N is hard. Don't sweat it. This doc may help:
http://pylonshq.com/docs/0.9.4.1/internationalization.html
Best Regards,
-jj
On 3/13/07, Bryan Lawrence <[EMAIL PROTECTED]> wrote:
>
> I can't make up my mind as to whether I was being obtuse, or it's just
> not obvious, but now you write it down it seems obvious, but then it
> didn't before ...
>
> Anyway, thanks, problem solved! I shall blog it ...
>
> Cheers
> Bryan
>
> On Tue, 2007-03-13 at 11:07 -0500, Ian Bicking wrote:
> > Bryan Lawrence wrote:
> > > Hi Ian
> > >
> > > Thanks for this, but I'm obviously being a bit obtuse:
> > >
> > >> Your app should never return any unicode. You can wrap pieces in
> > >> paste.lint or wsgiref.validate, which will possibly catch this error
> > >> earlier.
> > >
> > > But I'm returning something which is intended to become a web page ...
> > >
> > >>> Do I need to formally encode my base string somehow? I was under the
> > >>> impression that unicode objects should work fine ...
> > >> No, no unicode objects are allowed in WSGI.
> > >
> > > which means that it might not be an ascii web page ... how do i do that
> > > then?
> >
> > You just have to return encoded unicode, i.e., body.encode('utf8'). And
> > add that in the Content-Type, i.e., [('Content-type', 'text/html;
> > charset=utf8')]
> >
>
> _______________________________________________
> Paste-users mailing list
> [email protected]
> http://webwareforpython.org/cgi-bin/mailman/listinfo/paste-users
>
--
http://jjinux.blogspot.com/
_______________________________________________
Paste-users mailing list
[email protected]
http://webwareforpython.org/cgi-bin/mailman/listinfo/paste-users