DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25768>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25768

Cannot parse, code guard errors





------- Additional Comments From [EMAIL PROTECTED]  2003-12-31 10:20 -------
It looks like Borland has a different implementation for wcstombs.
>From the Visual C++ help:
"size_t wcstombs( char *mbstr, const wchar_t *wcstr, size_t count ); 
If wcstombs successfully converts the multibyte string, it returns the number 
of bytes written into the multibyte output string, excluding the terminating 
NULL (if any). If the mbstr argument is NULL, wcstombs returns the required 
size of the destination string. If wcstombs encounters a wide character it 
cannot be convert to a multibyte character, it returns –1 cast to type size_t."
>From the Borland help:
"size_t wcstombs(char *s, const wchar_t *wcs, size_t n);The function stores a 
multibyte string, in successive elements of the array whose first element has 
the address s, by converting in turn each of the wide characters in the string 
wcs. The multibyte string begins in the initial conversion state. The function 
converts each wide character as if by calling wctomb (except that the 
conversion state stored for that function is unaffected). It stores no more 
than n bytes, stopping after it stores a null byte. It returns the number of 
bytes it stores, not counting the null byte, if all conversions are 
successful; otherwise, it returns -1"

So, Borland doesn't have the behavior "if I give you a NULL target, tell me 
the size you need to do the conversion", that Xerces is relying on to be able 
to allocate just the right amount of memory.

At this point, I would replace the usage of this function in favour of the 
Win32 API WideCharToMultiByte. Any objection from the other committers?

Alberto

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

Reply via email to