On May 16, 2007, at 1:03 AM, voltron wrote:

>
> I did some poking around. This is the Pylons debug:
>
> CompileException: Could not read template using encoding of 'ascii'.
> Did you forget a magic encoding comment? in file 'D:\Projects
> \Pylons_projects\test\test\templates/standard.html' at line: 0 char: 0
> 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
> "http://www.w3.org/TR/html4/loose.dtd";>
> 2 <html>
> 3 <head>
> 4 <title>F&#246;n</title>
> 5 <link rel="SHORTCUT ICON" href="img/favicon.ico">

You definitely need a magic encoding comment because there's non- 
ascii characters in your template.

>
> I tried saving the file as UTF-8, that die not help at all, the Paster
> server threw an exception :

Did you include the magic encoding comment when you did this? Some  
editors will also use the utf-8 bom at the beginning of a file to  
identify mark the file as being in utf-8 (so a magic encoding comment  
isn't required). Python supports the utf-8 bom for .py files, however  
mako only started supporting identifying the utf-8 bom in the latest  
version (trunk).

>
>   File "memory:0x128a810", line 61, in render_body
> UnicodeDecodeError: 'ascii' codec can't decode byte 0xef in position
> 0: ordinal
> not in range(128)
>
> Does someone have an idea on the workflow of constructing templaters
> for mako from plain HTML from designers?


--
Philip Jenvey



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" 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/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to