• 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: iso-8859-1 over UTF8 (was: Re: cString deprecated!)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: iso-8859-1 over UTF8 (was: Re: cString deprecated!)


  • Subject: Re: iso-8859-1 over UTF8 (was: Re: cString deprecated!)
  • From: Rosyna <email@hidden>
  • Date: Mon, 2 Sep 2002 21:43:11 -0700

Yes, and there's a function for this.

Boolean CFStringGetCString(CFStringRef theString, char *buffer, CFIndex bufferSize, CFStringEncoding encoding);

Typecase the NSString to a CFStringRef. If you need the max length for the string, use:

CFIndex CFStringGetMaximumSizeForEncoding(CFIndex length, CFStringEncoding encoding);

With kCFStringEncodingISOLatin1 as the encoding.

No biggy ;)

Ack, at 9/3/02, Allan Odgaard said:

Yes, every 7 bit character keep its normal encoding.

However most of Europe make heavy use of accented letters and other stuff which in iso-8859-1 is placed in the range of 160-256.

The entire BSD layer in OS X is also geared toward iso-8859-1, not to mention that this has been the de-facto standard on all other platforms than Mac for the last 10-20 years, and I also believe it to be promoted somewhere as the internet standard (whatever that means).

So whenever I need a "char *" then I always go for iso-8859-1.

--


Sincerely,
Rosyna Keller
Technical Support/Holy Knight/Always needs a hug

Unsanity: Unsane Tools for Insanely Great People
---

Please include any previous correspondence in replies, it helps me remember what we were talking about. Thanks.
_______________________________________________
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.
References: 
 >iso-8859-1 over UTF8 (was: Re: cString deprecated!) (From: Allan Odgaard <email@hidden>)

  • Prev by Date: Re: iso-8859-1 over UTF8 (was: Re: cString deprecated!)
  • Next by Date: Puzzling graphics behavior in 10.2
  • Previous by thread: Re: iso-8859-1 over UTF8 (was: Re: cString deprecated!)
  • Next by thread: Re: iso-8859-1 over UTF8 (was: Re: cString deprecated!)
  • Index(es):
    • Date
    • Thread