• 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: Character encoding of C-string runtime functions?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Character encoding of C-string runtime functions?


  • Subject: Re: Character encoding of C-string runtime functions?
  • From: Greg Parker <email@hidden>
  • Date: Tue, 11 Jun 2013 14:32:42 -0700

On Jun 11, 2013, at 2:21 PM, Rick Mann <email@hidden> wrote:
> A function like sel_getName() returns a const char* NULL-terminated C string. What is the character encoding of this string?

Formally unspecified. It's possible to create a selector or class at runtime with arbitrary zero-terminated bytes and the runtime won't care.

In practice you should use UTF-8. That's what the compiler does.


--
Greg Parker     email@hidden     Runtime Wrangler



_______________________________________________

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: Character encoding of C-string runtime functions?
      • From: Rick Mann <email@hidden>
References: 
 >Character encoding of C-string runtime functions? (From: Rick Mann <email@hidden>)

  • Prev by Date: Character encoding of C-string runtime functions?
  • Next by Date: Re: Character encoding of C-string runtime functions?
  • Previous by thread: Character encoding of C-string runtime functions?
  • Next by thread: Re: Character encoding of C-string runtime functions?
  • Index(es):
    • Date
    • Thread