RE: 2 byte wchar_t...
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.
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