The function mbstowcs in the C library that comes with CodeWarrior, does
not have the same behavior as in other C libraries.  When you pass NULL
as the destination pointer, it will return zero instead of the number of
characters needed to represent the multibyte string in wide character.
A better way to deal with this is for CodeWarrior to be consistent with the common usage of this call and fix this "BUG". sorry for my 2 cents here.


As I am new to the xerces development, I was wondering where is it
appropriate to add new files that are relavent to platform, and what is
the practice to calling specific functions on different platforms.  Is
it ok to ifdef the code by C library that is being used?
Look under src/util you have the following directories:

Platforms - for platform dependent (hardware) files
Compilers - for Compiler dependent. Here there is a CodeWarriorDefs.cpp and CodeWarriorDefs.hpp.

Other directories are:

MsgLoader --- Msg. loader depend files.
Transcoders --- Localization & transcoding support dependent files.
NetAccessors --- primitive net accessors depent files
regx --- regular expression support ( mostly for Schema).

Through a search I found that calls to mbstowcs are made in the
transcoders code. ( under Transcoders directory). This is done
for the IConv transcoders and the native Win32 Trancoder.

You may use:
#if defined ( XML_METROWERKS ).......
.....

I think that the problem may occurr in Win32TransService ( native
transcoder for Win32.... I believe....) since it relies on the size
of the wide character string which would be returned by mbstowcs like
in Win32LCPTranscoder::calcRequiredSize.










Thank you for any feedback.

Zeid

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

_________________________________________________________________
Unlimited Internet access for only $21.95/month.� Try MSN! http://resourcecenter.msn.com/access/plans/2monthsfree.asp


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to