Re: Unicode replaceOccuranceOfString?
Re: Unicode replaceOccuranceOfString?
- Subject: Re: Unicode replaceOccuranceOfString?
- From: Charles Srstka <email@hidden>
- Date: Sun, 19 Sep 2004 01:59:47 -0500
On Sep 19, 2004, at 1:42 AM, Rachel Blackman wrote:
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...
Have you made sure your localized strings file uses UTF-16 Unicode
encoding?
Charles
_______________________________________________
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