So, i''m facing issues with encoding, since I need to write an application in portuguese-brazilian. This is the error i''m getting: "incompatible character encodings: UTF-8 and ASCII-8BIT" The curious thing is that i have a few other views with "special" characters, like Á or Ç, and all of them works. I have saved this view using the UTF-8 char encoding and also, as you can see, added the #enconding: UTF-8 comment in the top of the code. The yes_or_no method returns both words "Sim" or "Não", but that actually works, since I added the enconding comment. I recently added the word "Descrição" to the view itself, and the word "Próximo" to the will_paginate method at the bottom, and both fires the same error. So, I found a patch over the internet wich is supposed to fix it, but i really don''t know how to apply it. So, first, where do I have to place the patch file, and then, what code should I use to run the patch? here is the view code, in case anybody can help me in another way: <% # encoding: UTF-8 %> <h1>Projects</h1> <p><%= link_to "New Project", :action => "edit" %></p> <% if flash[:notice] %> <p style="color: green; font-style: italic"><%= flash[:notice] %></p> <% end %> <table border="1" cellpadding="5" cellspacing="1"> <tr> <th>Name</th> <th>Descrição</th> <th>Ativo</th> <th colspan="2">Acoes</th> </tr> <% @projects.each do |project| %> <tr> <td><%= project.name %></td> <td><%= project.description %></td> <td><%= yes_or_no?(project.active?) %></td> <td><%= link_to ''Editar'', { :action=> :edit , :id => project.id } %></ td> <td><%= link_to ''Apagar'', { :action=> :delete, :id => project.id}, :confirm => "Tem certeza?" %></td> </tr> <% end %> </table> <%= will_paginate @projects, {:previous_label => "", :next_label => "Próximo" } %> please, any light? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Hello, I''m having the same exact problem - I''m developing an app in french. Let me know if you figure out how to apply the patch and I''ll do the same. E On May 4, 9:02 pm, Samuel <gb.sam...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> So, i''m facing issues with encoding, since I need to write an > application in portuguese-brazilian. > > This is the error i''m getting: "incompatible character encodings: > UTF-8 and ASCII-8BIT" > > The curious thing is that i have a few other views with "special" > characters, like Á or Ç, and all of them works. I have saved this view > using the UTF-8 char encoding and also, as you can see, added the > #enconding: UTF-8 comment in the top of the code. The yes_or_no method > returns both words "Sim" or "Não", but that actually works, since I > added the enconding comment. I recently added the word "Descrição" to > the view itself, and the word "Próximo" to the will_paginate method at > the bottom, and both fires the same error. > > So, I found a patch over the internet wich is supposed to fix it, but > i really don''t know how to apply it. So, first, where do I have to > place the patch file, and then, what code should I use to run the > patch? > > here is the view code, in case anybody can help me in another way: > > <% # encoding: UTF-8 > > %> > > <h1>Projects</h1> > <p><%= link_to "New Project", :action => "edit" %></p> > <% if flash[:notice] %> > <p style="color: green; font-style: italic"><%= flash[:notice] %></p> > <% end %> > <table border="1" cellpadding="5" cellspacing="1"> > <tr> > <th>Name</th> > <th>Descrição</th> > <th>Ativo</th> > <th colspan="2">Acoes</th> > > </tr> > <% @projects.each do |project| %> > <tr> > <td><%= project.name %></td> > <td><%= project.description %></td> > <td><%= yes_or_no?(project.active?) %></td> > <td><%= link_to ''Editar'', { :action=> :edit , :id => project.id } %></ > td> > <td><%= link_to ''Apagar'', { :action=> :delete, :id => > project.id}, :confirm => "Tem certeza?" %></td> > </tr> > <% end %> > </table> > <%= will_paginate @projects, {:previous_label => "", :next_label => > "Próximo" } %> > > please, any light? > > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. > For more options, visit this group athttp://groups.google.com/group/rubyonrails-talk?hl=en.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
oh actually someone replied to my post: http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/e783f403919ec952/e8d18d777d44778b#e8d18d777d44778b I''ll try the suggestion out and hopefully have some luck. On May 5, 11:47 am, Mlle <emsto...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hello, > I''m having the same exact problem - I''m developing an app in french. > Let me know if you figure out how to apply the patch and I''ll do the > same. > > E > > On May 4, 9:02 pm, Samuel <gb.sam...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > So, i''m facing issues with encoding, since I need to write an > > application in portuguese-brazilian. > > > This is the error i''m getting: "incompatible character encodings: > > UTF-8 and ASCII-8BIT" > > > The curious thing is that i have a few other views with "special" > > characters, like Á or Ç, and all of them works. I have saved this view > > using the UTF-8 char encoding and also, as you can see, added the > > #enconding: UTF-8 comment in the top of the code. The yes_or_no method > > returns both words "Sim" or "Não", but that actually works, since I > > added the enconding comment. I recently added the word "Descrição" to > > the view itself, and the word "Próximo" to the will_paginate method at > > the bottom, and both fires the same error. > > > So, I found a patch over the internet wich is supposed to fix it, but > > i really don''t know how to apply it. So, first, where do I have to > > place the patch file, and then, what code should I use to run the > > patch? > > > here is the view code, in case anybody can help me in another way: > > > <% # encoding: UTF-8 > > > %> > > > <h1>Projects</h1> > > <p><%= link_to "New Project", :action => "edit" %></p> > > <% if flash[:notice] %> > > <p style="color: green; font-style: italic"><%= flash[:notice] %></p> > > <% end %> > > <table border="1" cellpadding="5" cellspacing="1"> > > <tr> > > <th>Name</th> > > <th>Descrição</th> > > <th>Ativo</th> > > <th colspan="2">Acoes</th> > > > </tr> > > <% @projects.each do |project| %> > > <tr> > > <td><%= project.name %></td> > > <td><%= project.description %></td> > > <td><%= yes_or_no?(project.active?) %></td> > > <td><%= link_to ''Editar'', { :action=> :edit , :id => project.id } %></ > > td> > > <td><%= link_to ''Apagar'', { :action=> :delete, :id => > > project.id}, :confirm => "Tem certeza?" %></td> > > </tr> > > <% end %> > > </table> > > <%= will_paginate @projects, {:previous_label => "", :next_label => > > "Próximo" } %> > > > please, any light? > > > -- > > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > For more options, visit this group athttp://groups.google.com/group/rubyonrails-talk?hl=en. > > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. > For more options, visit this group athttp://groups.google.com/group/rubyonrails-talk?hl=en.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.