tangor

msg:4098492 | 3:07 am on Mar 16, 2010 (gmt 0) |
Make sure your doc type embraces the character set.
|
exit44

msg:4098493 | 3:10 am on Mar 16, 2010 (gmt 0) |
I have used htmlentities() and html_entity_decode() to try to fix it but it doesn't seem to be working. I'm using UTF-8 in those functions and I have UTF-8 set on the doc-type, too.
|
claus

msg:4098494 | 3:15 am on Mar 16, 2010 (gmt 0) |
Is your DB table set to UTF-8 as well?
|
exit44

msg:4098496 | 3:18 am on Mar 16, 2010 (gmt 0) |
The db table is set to utf8_sweedish_ci. There was not just a "utf-8" selection for this. Which one should I choose?
|
claus

msg:4098497 | 3:23 am on Mar 16, 2010 (gmt 0) |
I believe the right one is utf8_general_ci If this doesn't solve your problem, I have no idea what the cause is ;-)
|
exit44

msg:4098503 | 3:34 am on Mar 16, 2010 (gmt 0) |
Dang. That didn't solve it. How do you handle clients copy/pasting the circle "r" character into web forms?
|
Ahkamden

msg:4098507 | 3:36 am on Mar 16, 2010 (gmt 0) |
Escape the characters they try to put in. If registered is that big, can you make it a checkbox, if checked when it's displayed you'll show the ASCII?
|
exit44

msg:4098509 | 3:41 am on Mar 16, 2010 (gmt 0) |
They want to put it into the middle of a character string, though. How do you handle that?
|
tangor

msg:4098514 | 3:58 am on Mar 16, 2010 (gmt 0) |
search for the expected character(s), strip it, then put the proper character back in. More work, of course!
|
claus

msg:4098556 | 5:13 am on Mar 16, 2010 (gmt 0) |
Of course, that's it. Users copy-paste from a wrong character set. Didn't think about that. Here's a quick regular expression that will take care of that for you: s/\u00AE/®/ \u00AE is the "circle r" ® is the corresponding HTML entity ( = ® ) I'm not sure if you use PHP/ASP/Perl/whatever, but I'm sure your programming language of choice has some way to implement a RegExp
|
|