Unicode replaceOccuranceOfString?
Unicode replaceOccuranceOfString?
- Subject: Unicode replaceOccuranceOfString?
- From: Rachel Blackman <email@hidden>
- Date: Sat, 18 Sep 2004 23:42:22 -0700
I have a situation wherein I would like to accept if someone pastes in various characters (such as the Unicode ellipse or emdash, or single or double quotes which have directions to them) which cannot be represented in ASCII, and translate them to their seven-bit-safe equivalents.
Unfortunately, I am at a complete loss on a way to do this. There is no way to encode non-7-bit characters in a string literal, as I know, but for whatever reason, NSLocalizedStringFromTable doesn't seem to work. I have to index by some kind of code (such as 'suh-emdash' for 'stupid Unicode hack: mdash) and for whatever reason, I still get 'suh-emdash' as my string. And yet unipunc.strings is in the English.lproj directory of my finalized .app... so I'm at a bit of a loss.
Further, it seems there must be a better way to do replacements of a few specific characters which simply don't happen to be 7-bit-safe...! Any advice would be very welcome...
--
Rachel 'Sparks' Blackman -- sysadmin, developer, mad scientist
"If it is not broken, give me five minutes to redesign it!" _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden