How to display twitter images with weird urls in flash?

I am parsing a public xml timeline from twitter and want to display images next to statuses.

The problem is that some of the image urls contain strange characters:

eg.

http://s3.amazonaws.com/twitter_production/profile_images/68803670/Gryn_i_h%E4ngmattan_normal.jpg

      

Some characters could be replaced with urlencode()

, but I don't know what to do with Asian text or other strange urls.

All I want is something that will return the default Twitter profile to me unless a correct image url is provided.

Any hints?

0


a source to share


1 answer


I believe you should use UTF-8 encoding instead. Correct url: http://s3.amazonaws.com/twitter_production/profile_images/68803670/Gryn_i_h%C3%A4ngmattan_normal.jpg

Isn't this doing this automatically when reading a string from a public utf-8 timeline? 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 encoding, no?



Edit: It looks like SO code has issues with non-ascii characters in the url :)

0


a source







All Articles