I am parsing the public timeline xml from twitter and want to display images next to the statuses.
The problem is some image urls contain strange characters:
e.g.
http://s3.amazonaws.com/twitter_production/profile_images/68803670/Gryn_i_h%E4ngmattan_normal.jpg
Some of the characters can be replaced with urlencode()
, but I have no idea what to do with asian text or other strange urls.
All I want is something that will return me the default twitter profile png if no valid image url is supplied.
Any hints ?
I believe you should use UTF-8 Encoding instead. The correct URL would then be: http://s3.amazonaws.com/twitter_production/profile_images/68803670/Gryn_i_h%C3%A4ngmattan_normal.jpg
Doesn't flash do that automatically when you read the string from the utf-8 encoded public timeline xml? If you just output the link http://s3.amazonaws.com/twitter_production/profile_images/68803670/Gryn_i_hängmattan_normal.jpg the browser should take care of the encoding, no?
Edit: looks like the SO code has problems with non-ascii characters in a url as well :)