ESESES
April 14, 2010, 11:59am
#1
I have no problems displaying data from my database with characters
like é à è etc. anywhere in my application; however on my edit page,
when it tries to display the data in the text fields I get
incompatible character encoding errors. Any ideas?
<% for c in @attribute_columns do %>
<%= f.text_field c.second %>
ESESES
April 14, 2010, 2:35pm
#2
On 14, April 2010, at 14 Apr 19:58, ES wrote:
I have no problems displaying data from my database with characters
like é à è etc. anywhere in my application; however on my edit page,
when it tries to display the data in the text fields I get
incompatible character encoding errors. Any ideas?
<% for c in @attribute_columns do %>
<%= f.text_field c.second %>
What version of Rails are you running?
Mikel
ESESES
April 21, 2010, 10:53am
#4
I have still not found a solution to this. Does anyone have an idea?
ESESES
April 21, 2010, 10:57am
#5
I think it could be browser issue. Check your addons in your browsers or
try
different clean browsers to see the issue occurring.
Maybe desktop has been configured to ascii language editor. Try in
a different computer.
Make sure that Database columns are utf8 compatible in the database.
database.yml should contain encoding: utf8
On 21 April 2010 09:40, ES [email protected] wrote:
like é à è etc. anywhere in my application; however on my edit page,
–
Nandri(Thanks in Tamil),
Amala S.
ESESES
April 22, 2010, 7:11pm
#6
It works if I write this as the value for the text field:
value="<%= @echantillon [‘material’].force_encoding(‘UTF-8’) %> "
Which means that when it is doing the SELECT from the database, it is
not selecting it in UTF-8. How can I force it to do selects in UTF-8?
ESESES
April 22, 2010, 11:59pm
#7
ES wrote:
It works if I write this as the value for the text field:
value="<%= @echantillon [‘material’].force_encoding(‘UTF-8’) %> "
Which means that when it is doing the SELECT from the database, it is
not selecting it in UTF-8. How can I force it to do selects in UTF-8?
Is the database using UTF-8? Is Rails connecting to it with UTF-8
encoding? Is UTF-8 encoding specified in your page headers?
Best,
Marnen Laibow-Koser
http://www.marnen.org
[email protected]
ESESES
April 22, 2010, 7:12pm
#8
you dont need to do this, if your setup is correct.
On 22 April 2010 18:08, ES [email protected] wrote:
On Apr 21, 10:40 am, ES [email protected] wrote:
On 14, April 2010, at 14 Apr 19:58, ES wrote:
What version of Rails are you running?
For more options, visit this group athttp://
http://groups.google.com/group/rubyonrails-talk?hl=en .
–
Nandri(Thanks in Tamil),
Amala S.