On 16 sep 2009, at 13.13, Johan Kool wrote:

I have been trying many combinations of encodings/decodings, but without the intended result. I do know what NSString wants, but that's not what I have. I have stringA as shown, and I have to somehow morph it into something usable. Basically I need NSString to interpret the characters a second time, but NSString seems to do all it can to keep it as is. Normally, that's indeed what I want, but not now...


I'm surprised that the most important question has not been asked yet: Where are you getting this string from, and how are you getting it into your application?

If it's not obvious from the API / service / file format that you're getting the string from what encoding that is being used, you can never expect to reliably get this right. The source needs to specify the encoding, and you need to use that encoding when you create your NSString. If I were you I'd stop guessing, and instead spend my time on figuring out what encoding is actually being used. Once you have that, the rest is trivial.

j o a r


_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to