iphone – display encoded characters like å,ä,ö in UILabel
I have a list that uses UILabel for each of its rows. If I try to display special characters such as å,ä,ö, it displays them as å ä ö How do I convert them into a UTF8 encoded NSString?
Solutions Collect From Internet About “iphone – display encoded characters like å,ä,ö in UILabel”
The characters display correctly in a WebView because the HTML entities are correctly interpreted by it.
Maybe this handy NSString category can help you to display the text how you want in a UILabel:
Import both NSString+HTML.h and NSString+HTML.m files, then in your class use
and then you can use
NSString *decodedString = [encodedString stringByDecodingHTMLEntities];
You can also try HerbertHansen’s solution on the apple dev boards which doesn’t need a whole library
- How to add 2 buttons into the UINavigationbar on the right side without IB?
- Pattern for unit testing async queue that calls main queue on completion
- Core Data NSManagedObject isFault inside prepareForDeletion
- Pass a block to a C++ method from objective C
- How to find a Clang warning flag in Xcode that's not present in build logs
- MonoTouch.Dialog: How to set limit of number of characters for EntryElement
- How to draw CGGradient with specific color?
- Dictionary printing results backwards
- Programmatically get the name of the Application Folder in OSX
- Is it okay to call an init method in self, in an init method?
- image in circle frame iOS
- convert date string to NSDate in objective c/iOS
- manually add UITabBar to UITableViewController
- Open a facebook link by native Facebook app on iOS
- Does bundle id need to be case sensitive?