On Sun, 18 Apr 2010 03:02:23 -0700, janwillem wrote:

> How can you get the unicode file name into the replace string of line 35
> of the snippet:
> replace = ReplaceString % dict(content_type=ct,
>                                        filename=fn,
>                                        params=params)
> without getting this nasty error message about ascii encoding?

Completely untested...

fn = fn.encode('utf-8')
replace = ReplaceString % dict(
          content_type=ct, filename=fn, params=params)



-- 
Steven
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to