I've found the problem...

In a erb file that was included via 'yield' (ie the file for the  
action) was a invisible character which had URL encoding value of  
"%C2%A0" or HTML encoding value of " "

I'm not sure why this was intermittent, or why haml reported the error  
about 8 lines below the yield...
The yield was on line 169, the reported error was:

   Showing app/views/layouts/application.html.haml where line #177  
raised:
   incompatible character encodings: ASCII-8BIT and UTF-8

The incompatible char was on line 10 of the erb file.

-Adam

On 23/07/2009, at 2:40 AM, Nathan Weizenbaum wrote:

> What version of Haml are you running?
>
> On Wed, Jul 22, 2009 at 8:36 AM, Adam Salter  
> <[email protected]> wrote:
>
> I'm trying to migrate my local dev environment to Ruby 1.9
> and I'm getting some strange encoding errors trying to display some
> haml templates
>
> "incompatible character encodings: ASCII-8BIT and UTF-8"
>
> The weird thing is that the errors only happen intermittently:
> I'm using passenger to serve pages...
>
> Interestingly I don't get the encoding errors serving the files using
> WebBrick...
>
> The errors are also on weird lines like:
>
> 174:         %li
> 175:           %ul
> 176:             %li
> 177:               = link_to "Home", home_path
>
> It's hardly complicated... and doesn't involve any hits to the
> database... home_path actually resolves to '/' which is the same char
> in ASCII and UTF8??
>
> Any suggestions most welcome,
> Cheers,
>
>
>
> >
>


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

Reply via email to