Weird characters - Encoding problem

All,

I have some text that I am trying to display on my html page than
contains some encoded chars. Something along the line “The worldââ?¢s
favorite…”
Obviously this is supposed to be a “’” but I can’t figure out the
magic spell to sub them out.

Thank you all for your help !!

hi

it is because ruby cannot handle unicode and multibyte chars
for example if you use simple_format(text), this method uses
text.length,
which will give a wrong value if there are multibyte chars and so the
text
is screwed

search for unicode hacks plugin in ror wiki


Heri R.
http://sprinj.com

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs