You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Geoff Coffey <gc...@wmotion.com> on 2001/09/27 08:02:44 UTC

Transcoder::canTranscodeTo behavior

We're using xerces on Mac OS and the implementation of
MacOSTranscoder::canTranscodeTo() needs some work. Right now it simply
returns true in all cases, which is obviously not a good thing.

I've modified the implementation and it is working well, but there is
something I don't understand. The Win32Transcoder::canTranscodeTo()
implementation does some checks up front to determine if the character is a
surrogate pair. I don't understand exactly what this means, or if I should
be concerned with this. The toCheck parameter is an unsigned int. What
exactly is being passed in? Right now I'm simply casting it to an XMLCh and
trying to transcode it. Is this enough?

Also, assuming I get this right, what do I need to do to get my changes back
to xml.apache.org so others don't have to spend the time on it? I'm very new
to all this...

Any help would be appreciated!

Thanks,

Geoff


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


Re: Transcoder::canTranscodeTo behavior

Posted by Dean Roddey <dr...@charmedquark.com>.
That code is really no longer needed. Xerces used to be able to support with
UTF-16 or UTF-32 modes for XMLCh. Since Win32 only understand UTF-16, that
code was breaking out a surrogate pair into to UTF-16 characters before
passing it in for test transcoding. Since, as of the current version, Xerces
is fixed at UTF-16 characters, that code will never get triggered.

--------------------------
Dean Roddey
The Charmed Quark Controller
Charmed Quark Software
droddey@charmedquark.com
http://www.charmedquark.com

"If it don't have a control port, don't buy it!"


----- Original Message -----
From: "Geoff Coffey" <gc...@wmotion.com>
To: "xerces c dev" <xe...@xml.apache.org>
Sent: Wednesday, September 26, 2001 11:02 PM
Subject: Transcoder::canTranscodeTo behavior


> We're using xerces on Mac OS and the implementation of
> MacOSTranscoder::canTranscodeTo() needs some work. Right now it simply
> returns true in all cases, which is obviously not a good thing.
>
> I've modified the implementation and it is working well, but there is
> something I don't understand. The Win32Transcoder::canTranscodeTo()
> implementation does some checks up front to determine if the character is
a
> surrogate pair. I don't understand exactly what this means, or if I should
> be concerned with this. The toCheck parameter is an unsigned int. What
> exactly is being passed in? Right now I'm simply casting it to an XMLCh
and
> trying to transcode it. Is this enough?
>
> Also, assuming I get this right, what do I need to do to get my changes
back
> to xml.apache.org so others don't have to spend the time on it? I'm very
new
> to all this...
>
> Any help would be appreciated!
>
> Thanks,
>
> Geoff
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org