• 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: 2 byte wchar_t...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: 2 byte wchar_t...


  • Subject: RE: 2 byte wchar_t...
  • From: "David Spells" <email@hidden>
  • Date: Fri, 23 Sep 2005 10:57:59 -0700
  • Thread-topic: 2 byte wchar_t...

I would like request that the system libraries be offered both ways (2-byte and 4-byte). I don't know how realistic that is but I would think that it would be popular if it were an option. Also, I know that it is fairly unrealistic (i.e. a lot of work) for us to scan through the several million lines of code that we have to make sure that we smoothly switch over to using 4-byte wchar_t's.


From: Chris Espinosa [mailto:email@hidden]
Sent: Friday, September 23, 2005 11:07 AM
To: David Spells
Cc: email@hidden
Subject: Re: 2 byte wchar_t...



On Sep 23, 2005, at 8:45 AM, David Spells wrote:

I think that I already know the answer to this problem but I thought that I would ask anyway. Is there a way to have 2 byte wchar_t instead of a 4 byte that would be used in std::wstring, etc...?

Yes and no.

You can set a compiler flag (-fshort-wchar ) that will build any compilation unit using 2-byte wchar_t.

But it won't link with any other system libraries that offer wchar_t ABIs (few as they are) because of the size mismatch.

So you can use it for isolated code units and internal implementation, or very controlled communication between units, but not in a real systemic way. This is a general problem in the C++ community as the standard declines to state the width of wchar_t and the Gnu, Windows, and CodeWarrior environments all go different directions.

Chris
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: 2 byte wchar_t...
      • From: "Justin C. Walker" <email@hidden>
  • Prev by Date: RE: Help debugging an issue...
  • Next by Date: Re: 2 byte wchar_t...
  • Previous by thread: Re: 2 byte wchar_t...
  • Next by thread: Re: 2 byte wchar_t...
  • Index(es):
    • Date
    • Thread