Unicode chars in string
Hi all, I am pulling my hair out here trying to replace the unicode (r) symbol with \\00ea in a string. Is there a way of doing this as the NSString is a unicode String so it is interpreting it. As convenient that might be to most people it is killing me here. Any suggestions? Damien ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Unicode chars in string
On 9 Sep 2013, at 09:13, Damien Cooke dam...@smartphonedev.com wrote: Hi all, I am pulling my hair out here trying to replace the unicode (r) symbol with \\00ea in a string. Is there a way of doing this as the NSString is a unicode String so it is interpreting it. As convenient that might be to most people it is killing me here. NSStrings already support unicode quite happily. clang will even let you use unicode directly in the source, so [string stringByReplacingOccurancesOfString:@“r” withString:@“somethingElse”] will work happily, as will [string stringByReplacingOccurancesOfString:@“→” withString:@“⤜”]. Tom Davie ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Unicode chars in string
Le 9 sept. 2013 à 09:54, Tom Davie tom.da...@gmail.com a écrit : On 9 Sep 2013, at 09:13, Damien Cooke dam...@smartphonedev.com wrote: Hi all, I am pulling my hair out here trying to replace the unicode (r) symbol with \\00ea in a string. Is there a way of doing this as the NSString is a unicode String so it is interpreting it. As convenient that might be to most people it is killing me here. NSStrings already support unicode quite happily. clang will even let you use unicode directly in the source, so [string stringByReplacingOccurancesOfString:@“r” withString:@“somethingElse”] will work happily, as will [string stringByReplacingOccurancesOfString:@“→” withString:@“⤜”]. This is true only if your sources are encoding in UTF-8 (which is the only encoding supported by clang AFAIK, and the only encoding that should ever be used anyway). -- Jean-Daniel ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Unicode chars in string
On Sep 9, 2013, at 12:13 AM, Damien Cooke dam...@smartphonedev.com wrote: I am pulling my hair out here trying to replace the unicode (r) symbol with \\00ea in a string. Is there a way of doing this as the NSString is a unicode String so it is interpreting it. As convenient that might be to most people it is killing me here. Can you explain in more detail what you’re trying to do? It sounds like you’re trying to convert a string from one encoding to another, but what are the source and target encodings? —Jens ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com