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 %> -- 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.
Mikel Lindsaar
2010-Apr-14 12:34 UTC
Re: display utf 8 characters in text fields in edit page
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 -- 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.
I''m running Rails 2.3.5 On Apr 14, 2:34 pm, Mikel Lindsaar <raasd...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> 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-- 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.
I have still not found a solution to this. Does anyone have an idea? On Apr 14, 6:47 pm, ES <emsto...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I''m running Rails 2.3.5 > > On Apr 14, 2:34 pm, Mikel Lindsaar <raasd...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > 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 > >-- 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.
Amala Singh
2010-Apr-21 08:52 UTC
Re: Re: display utf 8 characters in text fields in edit page
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 <emstolfo-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I have still not found a solution to this. Does anyone have an idea? > > On Apr 14, 6:47 pm, ES <emsto...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > I''m running Rails 2.3.5 > > > > On Apr 14, 2:34 pm, Mikel Lindsaar <raasd...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > 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 > > > > > > -- > 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- -- Nandri(Thanks in Tamil), Amala Singh -- 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.
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? On Apr 21, 10:40 am, ES <emsto...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I have still not found a solution to this. Does anyone have an idea? > > On Apr 14, 6:47 pm, ES <emsto...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > I''m running Rails 2.3.5 > > > On Apr 14, 2:34 pm, Mikel Lindsaar <raasd...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > 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 > > -- > 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.
Amala Singh
2010-Apr-22 17:10 UTC
Re: Re: display utf 8 characters in text fields in edit page
you dont need to do this, if your setup is correct. On 22 April 2010 18:08, ES <emstolfo-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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? > > > On Apr 21, 10:40 am, ES <emsto...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > I have still not found a solution to this. Does anyone have an idea? > > > > On Apr 14, 6:47 pm, ES <emsto...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > > > I''m running Rails 2.3.5 > > > > > On Apr 14, 2:34 pm, Mikel Lindsaar <raasd...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > 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 > > > > -- > > 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- -- Nandri(Thanks in Tamil), Amala Singh -- 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.
Marnen Laibow-Koser
2010-Apr-22 21:59 UTC
Re: display utf 8 characters in text fields in edit page
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 marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via http://www.ruby-forum.com/. -- 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 at http://groups.google.com/group/rubyonrails-talk?hl=en.