Submitted by Arancaytar on Fri, 10/20/2006 - 21:47.
She returned, and, as I said, I got to work on the problem of the Invisible Pink Unicode. Seriously, what with PHP's handling of character sets, that's what they should call it.
Turns out that - first - turning off the unicode character set in MySQL results will mean PHP stops trying to fit a single high-bit character into two ASCII slots. What character set is used instead, I have no idea. Typographical quotes are numbered 147 and 148; the single-character ellipsis (whose inventor needs to be beaten around the head with three periods) is 133 and so on. But at least we're now dealing with single characters, which are much easier to search for.
By running the string through a filter that looks up these values in a map (an "associative array"), I can turn these high-bit characters into more mundane ones - like three periods, a simple ", or a simple apostrophe.
By making these changes in the database, I save on runtime of the feed script as well.
I just managed to make the feed validate here for the first time in what must be a month or more. So I'm almost as happy about that as I am that Riverbend is okay.
Just in time!
She returned, and, as I said, I got to work on the problem of the Invisible Pink Unicode. Seriously, what with PHP's handling of character sets, that's what they should call it.
Turns out that - first - turning off the unicode character set in MySQL results will mean PHP stops trying to fit a single high-bit character into two ASCII slots. What character set is used instead, I have no idea. Typographical quotes are numbered 147 and 148; the single-character ellipsis (whose inventor needs to be beaten around the head with three periods) is 133 and so on. But at least we're now dealing with single characters, which are much easier to search for.
By running the string through a filter that looks up these values in a map (an "associative array"), I can turn these high-bit characters into more mundane ones - like three periods, a simple ", or a simple apostrophe.
By making these changes in the database, I save on runtime of the feed script as well.
I just managed to make the feed validate here for the first time in what must be a month or more. So I'm almost as happy about that as I am that Riverbend is okay.
--
Arancaytar