FROM : Erik J. Barzeski
DATE : Wed Nov 27 23:32:42 2002
Hi,
On 11/27/02 5:09pm, Chris Ridd <<email_removed>> wrote:
> How do you construct a static NSString in source code that contains
> arbitrary Unicode characters while keeping the source code in ASCII?
You don't.
Read up on the helpful @"" construction and you'll see that it's intended to
be used for 7-bit strings only. Construct your string in some other accepted
method and declare it static if you want.
Alternatively, of course:
NSLocalizedString(@"myUnicodeString","localizable.strings can be UTF");
> What I want to do is something like this:
>
> NSString *foo = @"Price is \u20ac99.95";
>
> I was expecting something like "\uxxxx" but the compiler doesn't like that.
> None of the obvious documentation (gcc docs, c preprocessor docs, Objc-C
> Programming Language) discusses this, and a few searches on mamasam didn't
> turn anything useful up apart from a similar (and unanswered!) question.
>
> Cheers,
>
> Chris
--
Kindest regards,
Erik J. Barzeski
There are two great secrets to success in life.
The first is to not tell everything you know.
###################################################################
Email: erik@(anything below) AIM: iacas
<A href="http://weims.net">http://weims.net
<A href="http://barzeski.com">http://barzeski.com
<A href="http://soundsetcentral.com">http://soundsetcentral.com
<A href="http://applescriptcentral.com">http://applescriptcentral.com
###################################################################
_______________________________________________
cocoa-dev mailing list | <email_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
DATE : Wed Nov 27 23:32:42 2002
Hi,
On 11/27/02 5:09pm, Chris Ridd <<email_removed>> wrote:
> How do you construct a static NSString in source code that contains
> arbitrary Unicode characters while keeping the source code in ASCII?
You don't.
Read up on the helpful @"" construction and you'll see that it's intended to
be used for 7-bit strings only. Construct your string in some other accepted
method and declare it static if you want.
Alternatively, of course:
NSLocalizedString(@"myUnicodeString","localizable.strings can be UTF");
> What I want to do is something like this:
>
> NSString *foo = @"Price is \u20ac99.95";
>
> I was expecting something like "\uxxxx" but the compiler doesn't like that.
> None of the obvious documentation (gcc docs, c preprocessor docs, Objc-C
> Programming Language) discusses this, and a few searches on mamasam didn't
> turn anything useful up apart from a similar (and unanswered!) question.
>
> Cheers,
>
> Chris
--
Kindest regards,
Erik J. Barzeski
There are two great secrets to success in life.
The first is to not tell everything you know.
###################################################################
Email: erik@(anything below) AIM: iacas
<A href="http://weims.net">http://weims.net
<A href="http://barzeski.com">http://barzeski.com
<A href="http://soundsetcentral.com">http://soundsetcentral.com
<A href="http://applescriptcentral.com">http://applescriptcentral.com
###################################################################
_______________________________________________
cocoa-dev mailing list | <email_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
| Related mails | Author | Date |
|---|---|---|
| Chris Ridd | Nov 27, 20:09 | |
| Erik J. Barzeski | Nov 27, 23:32 | |
| Chris Ridd | Nov 28, 08:10 | |
| Marco Binder | Nov 28, 10:48 | |
| Chris Ridd | Nov 28, 11:09 |






Cocoa mail archive

