Hello, I have a small problem with accentuated characters. I have setup everything for unicode and no problem so far (I can input chinese characters and it is displayed correctly) The only problem appear if I do a find like: User.find_by_name(''é'') This will give in the log: SELECT * FROM users WHERE (name=''é'') LIMIT 1 but it gives me the result of: User.find_by_name(''e'') without the accent. If I input the SQL in mysql, I got no problems. I don''t really understand why I have problems with accentuated characters as I don''t have any problem with chinese characters... Thanks! Maxime. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@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 -~----------~----~----~----~------~----~------~--~---
Hi! I''m having about the same problem... but different.. look here: http://groups-beta.google.com/group/rubyonrails-talk/browse_thread/thread/5d377d8d49a3bac3/c36087d1cf0cf804#c36087d1cf0cf804 (first time Iink to a thread in this forum, so let me know if you can open it). The title is: "International character search" I''m using postgresql, and I don''t get the ''é'' converted to ''e'' ...... maybe a mysql-only "feature"? Hope this helps, Ildefonso Camargo On Oct 13, 1:47 am, "Maxime" <maxime.guil...-nJw6cMSTflJWk0Htik3J/w@public.gmane.org> wrote:> Hello, > > I have a small problem with accentuated characters. > I have setup everything for unicode and no problem so far (I can input > chinese characters and it is displayed correctly) > > The only problem appear if I do a find like: > User.find_by_name(''é'') > > This will give in the log: > SELECT * FROM users WHERE (name=''é'') LIMIT 1 > > but it gives me the result of: User.find_by_name(''e'') without the > accent. > > If I input the SQL in mysql, I got no problems. > > I don''t really understand why I have problems with accentuated > characters as I don''t have any problem with chinese characters... > > Thanks! > Maxime.--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@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 -~----------~----~----~----~------~----~------~--~---
Hi! Thanks for your answer. It looks like that rails is doing the normalize automatically without calling it explicitely. I want to search with the accent, without normalization but it returns me the non-accentuated string. How to do that?? Maxime. ps: your link work :) --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Sorry for the delay.... lot of work here. On Oct 17, 3:52 am, "Maxime" <maxime.guil...-nJw6cMSTflJWk0Htik3J/w@public.gmane.org> wrote:> Hi! > > Thanks for your answer. > > It looks like that rails is doing the normalize automatically without > calling it explicitely. > I want to search with the accent, without normalization but it returns > me the non-accentuated string.Interesting.... I have never had this problem... specially because the log says that it is using the é in the sql statement. You could try to pass the :conditions parameter to the find function just to see: User.find(:all,:conditions => "name=''é''") And let me know what happend. When I get the time, I will test the "find_by_name" with postgresql, and see if I get the same problem. Hope this helps, Ildefonso Camargo --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@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 -~----------~----~----~----~------~----~------~--~---