I'm trying to convert text that's entered in a form into HTML characters (either numeric or alpha - I don't care which at this point) before storing in a database. Specifically things like "curly" quotes, curly apostrophe, bullet, accented characters - that sort of thing.
I had it all working great (using a character map array) when the page my form was in was encoded as ISO-8859-1, but now the page is UTF-8 and I can't get anything to work. I tried
mb_convert_encode($s,'HTML-ENTITIES','UTF-8');
which resulted in one kind of gibberish. Then I tried the class I found [URL="http://mikolajj.*********.pl/"]here[/URL], using
$cc = new ConvertCharset('utf-8', 'iso-8859-1', 1);
$result = $cc->Convert($imploded_string);
with different gibberish as the result (e.g. left double quote turns into �. Also tried running my character map on $result which resulted in even more gibberish.
I'm tempted to go back to ISO-8859-1...
Any ideas? Obviously I'm clueless regarding character sets...