Sunday, February 26, 2017

When phpBB blows up with "Char out of allowed range"

A forum user noticed that searching for a certain keyword lead not to a search results page, but an error spew. I reproduced the problem, and the specific error was "Char 0xFFFE out of allowed range" (repeated several times, plus some other notices). Searching the database's posts table for that keyword, I found that one post included some encoding-butchered text, a leftover from the forum migration. Using the post ID I found, I opened the editing page on the forum and replaced the text with the un-butchered version. Sure enough, that fixed it.

I also looked around for other instances of this error and found some other posts on the forum that caused it. Since this forum's encoding was double-misencoded, I couldn't always reverse the corruption, so I consulted the (only once-misencoded) SQL file to get the once-butchered text. Running it through this UTF8 decoder, I put the correct text back with the edit page.

No comments:

Post a Comment