• 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: GetApplicationTextEncoding & "carbon free"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GetApplicationTextEncoding & "carbon free"


  • Subject: Re: GetApplicationTextEncoding & "carbon free"
  • From: Aki Inoue <email@hidden>
  • Date: Fri, 21 Nov 2008 12:39:29 -0800

Hi,

Mike's comment is right on.
The sole purpose of GetApplicationTextEncoding() is to provide functional compatibility with OS 9-era localization resources such as STR#.
There really shouldn't be any need to make your app rely on the single script approach even for a modern CFString-based Carbon apps.


For Cocoa apps, you shouldn't have to even bother with localization- specific string encodings.

If you have any need to store text data by yourself, UTF-16 is the recommended storage encoding on Mac OS X.
If the file format requires to be a superset of ASCII, you can use UTF-8 as Mike described.


Aki

On 2008/11/21, at 7:27, Michael Ash wrote:

On Fri, Nov 21, 2008 at 4:42 AM, spsaxena <email@hidden> wrote:
Hi all,
I am working on making my application carbon free. I could not find any
replacement for the API "GetApplicationTextEncoding" probably because this
API has not been marked as deprecated yet. Because of this API I need to
link with the carbon framework which I don't want. Can you please suggest
any non-carbon API as a replacement for this API.

May I suggest simply removing it and *not* replacing it?

Language-specific text encodings are evil. Sometimes you have to deal
with them, of course. But if you do, then you should already know what
encoding you're dealing with and shouldn't need an API to give you an
"application" encoding. For places where you are able to choose the
encoding, UTF-8 is the only reasonable ASCII-compatible encoding to
use.

Mike
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: GetApplicationTextEncoding & "carbon free"
      • From: Deborah Goldsmith <email@hidden>
References: 
 >GetApplicationTextEncoding & "carbon free" (From: spsaxena <email@hidden>)
 >Re: GetApplicationTextEncoding & "carbon free" (From: "Michael Ash" <email@hidden>)

  • Prev by Date: Re: release and reference counting query
  • Next by Date: Re: Blue default button style hangs. (THREADED DRAWS!)
  • Previous by thread: Re: NSIndexSet
  • Next by thread: Re: GetApplicationTextEncoding & "carbon free"
  • Index(es):
    • Date
    • Thread