For a very thorough explanation of why you get this error, see http://yehudakatz.com/2010/05/17/encodings-unabridged/
On Sat, May 22, 2010 at 4:50 AM, ahe <[email protected]> wrote: > Hi, > > I'm developing a Rails 3 application using HAML and Ruby 1.9.2 > > I'm a french speaker and I'm getting "incompatible character > encodings: UTF-8 and ASCII-8BIT" errors when I use accented > characters. > It works fine when the text is loaded from my DB, but not when it is > written directly. > > So for example, a simple HAML template like this doesn't work : > > %h1 Remboursé > > I have the exact same issue in a controller. If I do : > > def index > puts "remboursé" > end > > To correct this I have to add # encoding: utf-8 at the top of my > controller. > > How can I do the same with HAML? > > Thanks! > > -- > 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] <haml%[email protected]>. > For more options, visit this group at > http://groups.google.com/group/haml?hl=en. > > -- 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.
