• 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: wchar_t* turned into a char*?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: wchar_t* turned into a char*?


  • Subject: Re: wchar_t* turned into a char*?
  • From: Marshall Clow <email@hidden>
  • Date: Tue, 27 Jul 2004 17:22:38 -0700

At 5:59 PM -0600 7/27/04, Mark Morrill wrote:
Yep. I know wchar_t is implementation defined. Unix world general takes
it as 32 bits. Windows takes it as 16 bits. Carbon/Foundation is using
16 bits.

For what it's worth, CoreFoundation is using a 16 bit wchar_t.
CFString uses UTF-16 internally, but that doesn't have anything to do with wchar_t.



GCC defines wchar_t as 32 bits. Heck, gcc defines bool as 32 bits.

CodeWarrior defines wchar_t as 16 bits.


I've done a but more poking about. I'm using Xcode on Mac OS X 10.3.4,
and pretty sure I'm using gcc 3.3.

You probably are.

When the compiler comes across the following (I'm using UTF-8 encoded
source).
	wchar_t*	str = L"三個子"; // <- 3 characters

That didn't get here unmangled, so I can't say if gcc is handling it correctly :-(


--
-- Marshall

Marshall Clow     Idio Software   <mailto:email@hidden>

It is by caffeine alone I set my mind in motion.
It is by the beans of Java that thoughts acquire speed,
the hands acquire shaking, the shaking becomes a warning.
It is by caffeine alone I set my mind in motion.
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: wchar_t* turned into a char*?
      • From: Marshall Clow <email@hidden>
References: 
 >wchar_t* turned into a char*? (From: Mark Morrill <email@hidden>)
 >Re: wchar_t* turned into a char*? (From: Allan Odgaard <email@hidden>)
 >Re: wchar_t* turned into a char*? (From: Mark Morrill <email@hidden>)

  • Prev by Date: Re: wchar_t* turned into a char*?
  • Next by Date: Re: wchar_t* turned into a char*?
  • Previous by thread: Re: wchar_t* turned into a char*?
  • Next by thread: Re: wchar_t* turned into a char*?
  • Index(es):
    • Date
    • Thread