1

Possible Duplicate:
How to convert Unicode strings (\u00e2, etc) into NSString for display?

I am downloading web pages into a NSString.

After downloading, it turns out to be that many chars in some web pages look like these:

**\u003c**div style\u003d\"float:left;padding-right:10px\"\u003e\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\u003cdiv\u003e\u003ca title\u003d\"Click here to read Penn State NCAA Sanctions: Four-Year Bowl Ban, Vacated Wins, $60 Million Fine, Significant Scholarship Reductions\"

I wish to use regex <img[^>]*> to parse all images out, but with these \u**** thing, I can't do that.

Is there a way to pre-transforming all those \u**** thing into readable chars like <?

Thanks

Community
  • 1
  • 1
Jack
  • 3,913
  • 8
  • 41
  • 66
  • [Some possibilities](http://stackoverflow.com/questions/8795702/how-to-convert-uxxxx-unicode-to-utf-8-using-console-tools-in-nix) – Kirby Todd Jul 23 '12 at 14:29
  • There are a hundred different formats that use `\u` escapes, find out which one you have and use a proper parser for it, not a regex hack. Best guess given no other information: JSON. – bobince Jul 23 '12 at 21:08

0 Answers0