[wp-hackers] transients and non utf 8 chars

Haluk Karamete halukkaramete at gmail.com
Sat Feb 1 15:33:15 UTC 2014


I stored 10 news items in a bulleted list HTML in a transient.
One of the news items was this:

Century of Violence:ÊWhat World War I Did to the Middle East

When I retrieve the transient and display it on the screen, browser stops
displaying the stored html exactly at

Century of Violence:

That is right before that funny char "Ê".

I was grabbing the text on the fly from another web site which I have full
control over. (I will go ahead and fix the code on that site as the why the
heck we got that funny char to begin with in there so it won't be a problem
) but... I'm still interested in how deal with this kind of stuff...

Is there a way to run the transient HTML ( beofre it gets stored ) thru
some sort of a utf8 filter that would filter out such unwanted chars? -
even better - replace'em with *reasonable alternatives* from the utf8
world.This way, no matter what the original text contains we can be sure
that it will be tamed.

how do you deal with such problems?


More information about the wp-hackers mailing list