[Expat-bugs] [ expat-Bugs-1255896 ] Expat 1.95.8 ReadMe

SourceForge.net noreply at sourceforge.net
Wed Aug 10 16:43:54 CEST 2005


Bugs item #1255896, was opened at 2005-08-10 10:43
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=110127&aid=1255896&group_id=10127

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Documentation
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: abhijitk (abhijitkankaria)
Assigned to: Fred L. Drake, Jr. (fdrake)
Summary: Expat 1.95.8 ReadMe

Initial Comment:
>From Expat ReadMe:
--------------------------------------------------------------------------------------
If you are interested in building Expat to provide document
information in UTF-16 rather than the default UTF-8,
following these instructions:
  1. For UTF-16 output as unsigned short (and
version/error           strings as char), run:
               ./configure CPPFLAGS=-DXML_UNICODE

     For UTF-16 output as wchar_t (incl. version/error
strings),           run:
               ./configure CFLAGS="-g -O2 -fshort-wchar"                           CPPFLAGS=-DXML_UNICODE_WCHAR_T

  2. Edit the MakeFile, changing:
               LIBRARY = libexpat.la
           to:
               LIBRARY = libexpatw.la
           (Note the additional "w" in the library name.)

  3. Run "make buildlib" (which builds the library only).
  4. Run "make installlib" (which installs the library
only).
--------------------------------------------------------------------------------------
As per the defination of -fshort-wchar:

-fshort-wchar
         Override the underlying type for wchar_t to be
short
         unsigned int instead of the default for the
target.
         This option is useful for building programs to
run under
         WINE.
 
         Warning: the -fshort-wchar switch causes GCC
to     generate code that is not binary compatible with
code generated without that switch.  Use it to conform
to a non-default application binary interface.
--------------------------------------------------------------------------------------

So this indicates that the option -fshort-wchar is to
be used in case I need UTF-16 output as unsigned short.
But as the ReadMe suggests should I use the option
-fshort-wchar for UTF-16 output as wchar_t?

Please correct me if my understanding is incorrect.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=110127&aid=1255896&group_id=10127


More information about the Expat-bugs mailing list