I have an application that reads the data in UTF-8 format from the server, but it has to be displayed in ISO 8859-1(Latin-1). Are there any Cocoa APIs to achieve this?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use
NSString‘sgetCString:maxLength:encoding:method, like this:Once you have this, you can then re-initialize an
NSStringinstance from that same encoding using thestringWithCString:encoding:class method: