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
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
I’m not an expert, but I have also had some difficulties with this
before. The key things to resolve this for me were:
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
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:
- make sure that your database field formats are correct (e.g. utf-8).
- add (depending on your database field formats) something like: 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 that
On Feb 10, 2007, at 5:00 PM, J. mp wrote:
layout.
what is the best way to deal with non-english characters?
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
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs