I have a script which produces text output. That script grabs content from a MySQL database encoded as latin1_general_ci. Including that script in a HTML page marked as iso-8859-1 works fine.
How do I capture the output of this script and include it in a HTML page encoded in utf-8?
I have attempted to capture the output of the script using ob_start() and then spit it out with ob_end_flush(). The idea was to convert the charset of the output from ob_end_flush().
I've tried the following, but the content in iso-8859-1 doesn't seem to be converting (I still see funny characters in my browser):
utf8_encode(ob_end_flush());