Hello,
I have created a function in mysql 5.0.45 using sqlyog that replaces certain characters like '® and '™' with html entities. The function is called from a stored proc. We import data from sql server 2000 into mysql. The data is then displayed using ruby on rails(ror).
ror can't display all the characters in some of our text (varchar) fields, which is the reason for the function. It displays a ? with a diamond around it for characters like '® or '™'.
In sqlyog if I use the actual characters in the REPLACE function everything is fine. When I run the function from the mysql command prompt the function doesn't work, none of the characters get replaced. I tried using CHAR() instead of the actual characters and I thought it worked, but some of the characters are considered equal when using the CHAR() function. For instance CHAR(226) will replace both ’ and ™, which isn't good.
So it looks to be a character set issue. Can I tell the function to use a different character set than the db default? Or is there another method I could be using to recognize these characters?
Thanks,