I have strings that I download from the web that look like this:
משה פרץ
How can I get the real string from this string?
I have strings that I download from the web that look like this:
משה פרץ
How can I get the real string from this string?
You could try the GTMNSString+HTML class developed by Google. Specifically, the method:
/// Get a string where internal characters that are escaped for HTML are unescaped
//
/// For example, '&' becomes '&'
/// Handles   and 2 cases as well
///
// Returns:
// Autoreleased NSString
//
- (NSString *)gtm_stringByUnescapingFromHTML;
Github (Michael Waterfall) - actually from Google Toolbox for Mac - may or may not be compatible with iOS.
The string you are getting from the web contains HTML entities (i.e: מ
). You could manually detect and capture the hexadecimal values (ie: 0x5DE
in this case) and feed it to a NSMutableString.
This other question might have other useful options for you: Objective-C: How to replace HTML entities?