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/.
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
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 that
There'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
R...@AgileConsultingLLC.com