You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-user@axis.apache.org by Tony Dodd <to...@btinternet.com> on 2005/02/17 20:46:51 UTC

Windows, Xerces, UTF-8

I cannot deserialize non-ASCII characters in strings. The problem appears to
be that the Xerces parser wrapper XercesHandler.cpp calls
XMLString::transcode() which, under Windows, calls WideCharToMultiByte with
argument CP_ACP, thus converting Unicode to ASCII rather then UTF-8.

Before trying to rebuild the library with a UTF-8 transcoder - a non-trivial
exercise since the source of Xerces I have is for the latest version - I'd
be grateful to hear if there is some simpler workaround (or if I'm barking
up the wrong tree altogether).

Thanks

Tony Dodd
Oxford University RTS


RE: Windows, Xerces, UTF-8

Posted by Bob Blair <bb...@yahoo.com>.
Is the Axis C++ team, or anyone else reading this,
planning to implement WS-Management (or one of its
component standards such as WS-Addressing and/or
WS-Enumeration) in the next few months?

I've made a tentative decision to use Axis C++ as the
basis of my company's WS-Management implementation,
but the prospect is daunting.  I will be looking for
others who are willing to share the strategy as well
as the risk and expense.

Please contact me if you know of such an effort, or
are interested in participating in one.

Bob Blair


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

RE: Windows, Xerces, UTF-8

Posted by Tony Dodd <to...@btinternet.com>.
I'm sure that's the right thing to do on most platforms. Unfortunately in
Windows Xerces does not look at the locale but always uses ASCII. See
Win32LCPTranscoder::transcode() in Win32TransService.cpp.

Tony Dodd

Oxford University RTS  

>-----Original Message-----
>From: Nadir Amra [mailto:amra@us.ibm.com] 
>Sent: 17 February 2005 19:52
>To: Apache AXIS C User List
>Subject: Re: Windows, Xerces, UTF-8
>
>Would this be not solved by running the process in UTF-8 locale? 
>Currently, on ASCII platforms, that is the restriction if you 
>are sending non-ascii characters.
>
>"Tony Dodd" <to...@btinternet.com> wrote on 02/17/2005 01:46:51 PM:
>
>> I cannot deserialize non-ASCII characters in strings. The problem
>appears to
>> be that the Xerces parser wrapper XercesHandler.cpp calls
>> XMLString::transcode() which, under Windows, calls 
>WideCharToMultiByte
>with
>> argument CP_ACP, thus converting Unicode to ASCII rather then UTF-8.
>> 
>> Before trying to rebuild the library with a UTF-8 transcoder - a
>non-trivial
>> exercise since the source of Xerces I have is for the latest 
>version -
>I'd
>> be grateful to hear if there is some simpler workaround (or if I'm
>barking
>> up the wrong tree altogether).
>> 
>> Thanks
>> 
>> Tony Dodd
>> Oxford University RTS
>> 
>


Re: Windows, Xerces, UTF-8

Posted by Nadir Amra <am...@us.ibm.com>.
Would this be not solved by running the process in UTF-8 locale? 
Currently, on ASCII platforms, that is the restriction if you are sending 
non-ascii characters.

"Tony Dodd" <to...@btinternet.com> wrote on 02/17/2005 01:46:51 PM:

> I cannot deserialize non-ASCII characters in strings. The problem 
appears to
> be that the Xerces parser wrapper XercesHandler.cpp calls
> XMLString::transcode() which, under Windows, calls WideCharToMultiByte 
with
> argument CP_ACP, thus converting Unicode to ASCII rather then UTF-8.
> 
> Before trying to rebuild the library with a UTF-8 transcoder - a 
non-trivial
> exercise since the source of Xerces I have is for the latest version - 
I'd
> be grateful to hear if there is some simpler workaround (or if I'm 
barking
> up the wrong tree altogether).
> 
> Thanks
> 
> Tony Dodd
> Oxford University RTS
>