This is not a web.py issue as I see it. But rather some kind of "are all
the encodings equal". Just make sure, that everything is f.ex. in utf-8
(so: your code files, the webpy code files, the stream sent to the
client) etc.

So - nothing about web.notfound at all. Just the normal weirdness with
encodings :D


Am 04.08.2010 17:08, schrieb boubou_cs:
> Hi,
> 
> I found a way to customize the page notfound using a template:
> 
> In code.py:
> 
>       def notfound():
>               return web.notfound(render.notfound(""))
> 
>       app.notfound = notfound
> 
> Then in the template folder i added a notfound.html :
> 
> $def with (text)
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
>       "http://www.w3.org/TR/html4/strict.dtd";>
>       <html>
>       <head>
>       <title>404 Not Found</title>
>       </head>
> 
>       <body>
>       <h1>Not Found</h1>
>       <p>$text </p>
>       <hr>
> 
>       </body>
>       </html>
> 
> when I need to call web.notfound, simply add the desired text this
> way:
> 
>       raise web.notfound("Cette page ne peut être accessible.")
> 
> However, I can not display the text with European accents.
> My text appears like this:
> 
>       Cette page ne peut A²tre accessible
> 
> Any idea?
> 


Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to