• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: String encoding question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: String encoding question


  • Subject: Re: String encoding question
  • From: Chris Ridd <email@hidden>
  • Date: Mon, 01 Sep 2003 07:01:20 +0100

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(@"x 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.

  • Prev by Date: set color of color well in AppleScriptStudio
  • Next by Date: NSImage size in a NSImageView
  • Previous by thread: set color of color well in AppleScriptStudio
  • Next by thread: NSImage size in a NSImageView
  • Index(es):
    • Date
    • Thread