• 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: Conflicting encodings issue in a Cocoa app
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Conflicting encodings issue in a Cocoa app


  • Subject: Re: Conflicting encodings issue in a Cocoa app
  • From: Jean-Daniel Dupas <email@hidden>
  • Date: Mon, 21 Apr 2008 19:05:01 +0200


Le 21 avr. 08 à 18:54, Aki Inoue a écrit :

(By the way, in 10.5, GCC now allows you to use non-ascii characters in string literals right in your source code. So there's no need to construct a string with an ñ in it programmatically, as long as you're building with Xcode 3.0.)


What will be the output encoding in this case ? GCC generate utf-8 or it uses the source file encoding ?

Regardless of GCC binary C string encoding settings, the content of constant CF/NSStrings are stored in UTF-16 in this case.


So, as long as your file encoding matches the GCC's file encoding setting (see -finput-charset) which is default to UTF-8, it just works.

Aki


Thank you.
I didn't realize that "string literals" means CF/NSStrings and not standard C strings.





_______________________________________________

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


References: 
 >Conflicting encodings issue in a Cocoa app (From: "Ewan Delanoy" <email@hidden>)
 >Re: Conflicting encodings issue in a Cocoa app (From: Jens Alfke <email@hidden>)
 >Re: Conflicting encodings issue in a Cocoa app (From: Jean-Daniel Dupas <email@hidden>)
 >Re: Conflicting encodings issue in a Cocoa app (From: Aki Inoue <email@hidden>)

  • Prev by Date: Re: Implementing a Slightly Unusual NSTableView
  • Next by Date: Re: Copying contents of an NSString to the Clipboard
  • Previous by thread: Re: Conflicting encodings issue in a Cocoa app
  • Next by thread: Selection in NSCollectionView
  • Index(es):
    • Date
    • Thread