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
%>
Projects
<%= link_to "New Project", :action => "edit" %>
<% if flash[:notice] %><%= flash[:notice] %>
<% end %>Name | Descrição | Ativo | Acoes | |
---|---|---|---|---|
<%= project.name %> | <%= project.description %> | <%= yes_or_no?(project.active?) %> | <%= link_to 'Editar', { :action=> :edit , :id => project.id } %> | <%= link_to 'Apagar', { :action=> :delete, :id => project.id}, :confirm => "Tem certeza?" %> |
please, any light?