OK I'm now testing in my WineIntro forum which is still using the default iso-8859-1 character set in the HTML header, and the posts table is still latin1 and MyISAM. So all the same as before.

I'm working in showflat.inc.php to test. On line 590 it does the query to get the post_body.

I made a post with the text "xyzzy" in it to test. I then added this code at line 684, right when the first loop is being done through the posts.

Code
$lisatest = $results[$i]['POST_BODY'];
$lisapos = strrpos($lisatest, "xyzzy");
if ($lisapos === false) {
	// not found...
}
else {
	$lisatest = "replacedthexyzzyitworked";
$results[$i]['POST_BODY'] = $lisatest;
}

That works perfectly. The post in question turns into the string. So the code does see the post and works with it.

Then I have a separate test post which begins with the text "test post with unicode" and then goes on to have some curly quotes in it. It currently does not display.

When I change the above code to read:

Code
$lisatest = $results[$i]['POST_BODY'];
$lisapos = strrpos($lisatest, "test post with unicode");
if ($lisapos === false) {
	// not found...
}
else {
	$lisatest = "replacedthexyzzyitworked";
$results[$i]['POST_BODY'] = $lisatest;
}

This does NOT work. I still have a blank post.

If this did work, there would be zero unicode characters in the post from this point forward and everything else should work as usual.

I am getting the sense that even here, so early in the process, the post body value is simply empty. The content of that post is not being put into the variable. And to me that indicates it's something about the SELECT statement, that it is unable to receive the row because of the UNICODE characters in it. There is pretty much nothing at all between when the data is selected and when I try to act on it.

Am I missing something that is happening between the SELECT and my code?


Lisa Shea, owner, BellaOnline.com
BellaOnline Website
BellaOnline Forums - UBB since Apr 2002 - 58,000 members / 850,000 posts