hi all, what is the best way to deal with non-english characters? for example, I have a field withthe value "joão" after saving the value "João". How do I deal with this issue? Thnaks -- 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-/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?hl=en -~----------~----~----~----~------~----~------~--~---
I''m not an expert, but I have also had some difficulties with this before. The key things to resolve this for me were: 1. make sure that your database field formats are correct (e.g. utf-8). 2. add (depending on your database field formats) something like: <meta http-equiv="content-type" content="text/html; charset=utf-8" /> to your layout. Hope this helps Darren Hope this helps J. mp wrote:> hi all, > > what is the best way to deal with non-english characters? > > for example, I have a field withthe value "joão" after saving the value > "João". How do I deal with this issue? > > Thnaks-- 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-/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?hl=en -~----------~----~----~----~------~----~------~--~---
Guest wrote:> I''m not an expert, but I have also had some difficulties with this > before. The key things to resolve this for me were: > > 1. make sure that your database field formats are correct (e.g. utf-8). > 2. add (depending on your database field formats) something like: <meta > http-equiv="content-type" content="text/html; charset=utf-8" /> to your > layout. > > Hope this helps > > Darren > > > Hope this helps > > J. mp wrote: >> hi all, >> >> what is the best way to deal with non-english characters? >> >> for example, I have a field withthe value "joão" after saving the value >> "João". How do I deal with this issue? >> >> ThnaksThansk, I''ve done that already. Thanks now my probkem is other :) in my db i''m saving correclty the string, but I''m now seeking for a way to replace all charecters like ã, Â, â, Â, etc by their corresponding HTML codes, and I can''t find a way to do that -- 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-/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?hl=en -~----------~----~----~----~------~----~------~--~---
On Feb 10, 2007, at 5:00 PM, J. mp wrote:> Guest wrote: >> I''m not an expert, but I have also had some difficulties with this >> before. The key things to resolve this for me were: >> >> 1. make sure that your database field formats are correct (e.g. >> utf-8). >> 2. add (depending on your database field formats) something like: >> <meta >> http-equiv="content-type" content="text/html; charset=utf-8" /> to >> your >> layout. >> >> Hope this helps >> >> Darren >> >> Hope this helps >> >> J. mp wrote: >>> hi all, >>> >>> what is the best way to deal with non-english characters? >>> >>> for example, I have a field withthe value "joão" after saving >>> the value >>> "João". How do I deal with this issue? >>> >>> Thnaks > > Thansk, > I''ve done that already. Thanks > now my probkem is other :) > in my db i''m saving correclty the string, but I''m now seeking for a > way > to replace all charecters like ã, Â, â, Â, etc by their corresponding > HTML codes, and I can''t find a way to do thatThere''s no general way to do that since HTML doesn''t define character entities for all possible characters. If you''ve specified that utf-8 is in use throughout (database, Rails [Ruby''s $KCODE], HTML), then you shouldn''t need to convert. Of course, the end user may not be able to see the character you intend if his/her system lacks a suitable font. -Rob Rob Biedenharn http://agileconsultingllc.com Rob-xa9cJyRlE0mWcWVYNo9pwxS2lgjeYSpx@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---