Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: String encoding question



On 31/8/03 7:07 pm, Tito Ciuro <email@hidden> wrote:

> Hello,
>
> If I use the [NString availableStringEncodings], I obtain the following
> value for Western (Mac OS Roman): 23032656

Your code's wrong. You're probably using the address of the NSStringEncoding
instead of the NSStringEncoding value - does the next one have a "value"
which is 23032660? This code:

---
NSStringEncoding *available = [NSString availableStringEncodings];
while (*available) {
NSLog(@"%08x is %@", *available,
[NSString localizedNameOfStringEncoding: *available]);
available++;
}
---

prints:

---
2003-09-01 06:55:16.438 test[15132] 0000001e is Western (Mac OS Roman)
2003-09-01 06:55:16.440 test[15132] 80000001 is Japanese (Mac OS)
2003-09-01 06:55:16.442 test[15132] 80000002 is Traditional Chinese (Mac OS)
2003-09-01 06:55:16.448 test[15132] 80000003 is Korean (Mac OS)
...
---

> However, NSString.h shows Western (Mac OS Roman) with a value of 30.

Cheers,

Chris
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.