This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Support for Unicode in gcc


On Thu, Aug 03, 2000 at 08:46:34AM -0700, Michael Vance wrote:
> On Thu, Aug 03, 2000 at 07:58:36AM -0300, Alexandre Oliva wrote:
> 
> > > wchar_t   *wtext = L"abc";

In standards speak, you are not getting a Unicode string with the above, you
are getting a wide character string.  It just so happens on the Windows system,
that they use currently use Unicode for the wide character representation.

> > > How do we do this in gcc?
> > 
> > Just like in VC++.  The line above compiles successfully for me with
> > g++.
> 
> Right. Except that VC++ generates a string with two-byte characters,
> and gcc generates a string with four-byte characters.

You didn't mention what system you are using.  Different systems have different
sizes of wchar_t.  GCC tries to conform to whatever is the local convention on
the system.

-- 
Michael Meissner, Red Hat, Inc.
PMB 198, 174 Littleton Road #3, Westford, Massachusetts 01886, USA
Work:	  meissner@redhat.com		phone: +1 978-486-9304
Non-work: meissner@spectacle-pond.org	fax:   +1 978-692-4482

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]