Also I'd like to point out that when a file upload is involved, the debugger does not function which is a source of major headaches... So I guess this is another bug...
On Mar 6, 2:10 pm, Alex K <[email protected]> wrote: > this f.validates(web.input(_unicode=False)) fixes the problem. > > Why woud webpy systematically assumes the user input (and especially > files) are utf-8? My guess is that it shouldn't but maybe I'm missing > something. Could someone explains to me the rationale behind this? > Thank you. > > On Mar 6, 1:43 pm, Alex K <[email protected]> wrote: > > > and after a while I get a Unicode Decode Error > > >http://pastie.org/409301 > > > On Mar 6, 1:32 pm, Alex K <[email protected]> wrote: > > > >http://pastie.org/409292 > > > > On Mar 6, 1:30 pm, Alex K <[email protected]> wrote: > > > > > class upload: > > > > def GET(self): > > > > yield r'''<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 > > > > Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1- > > > > transitional.dtd"> > > > > <html xmlns="http://www.w3.org/1999/xhtml"> > > > > <head> > > > > <meta http-equiv="Content-Type" content="text/html; > > > > charset=utf-8" /> > > > > </head> > > > > <body> > > > > <form action="" enctype="multipart/form-data" > > > > method="post">''' > > > > yield self.form().render_css() > > > > yield '<form action="" enctype="multipart/form-data" > > > > method="post">' > > > > yield '</form></body></html>' > > > > > def POST(self): > > > > f = self.form() > > > > f.validates() > > > > return 'You will never see this text if you upload a file.' > > > > > def form(self): > > > > return form.Form( > > > > form.File('resume_fn', > > > > form.notnull, > > > > description='It will take forever if we validate the > > > > form'), > > > > form.Button('submit', type='submit', value='Apply')) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web.py" 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/webpy?hl=en -~----------~----~----~----~------~----~------~--~---
