I am trying to build a function to extract the Facebook ID of a user.
The simple part of my function works fine, but I would like to display the user's name as well - this breaks down when foreign characters are displayed.
Off hand I don't know an easy way to do this, though you could probably do something with preg_replace_callback(), using a character class that is a range of UTF-8 character codes above decimal 255. But my first thought is, why bother? Why not just serve up the page as UTF-8 and not worry about it?
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
Bookmarks