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=7022>.
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=7022

DOMString::transcode ( and XMLString::transcode() ) fails on SuSE LINUX 7.3 for non 
UTF-8 Strings

           Summary: DOMString::transcode ( and XMLString::transcode() )
                    fails on SuSE LINUX 7.3 for non UTF-8 Strings
           Product: Xerces-C++
           Version: 1.6.0
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: Critical
          Priority: Other
         Component: Utilities
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


DOMString::transcode ( and XMLString::transcode() ) fails on Linux ( SuSe 7.3 )
with
special characters if locale is not UTF-8.
The Problem seems to be mbstowcs() used by transcode();
mbstowcs( NULL, "Espaņol", 0) returns -1 if the editor is not UTF-8.

Example:

#include <iostream>

#include <dom/DOMString.hpp>
#include <util/PlatformUtils.hpp>

int
main (int argc, char** argv)
{
  XMLPlatformUtils::Initialize();
  DOMString domString( "[°C]" );
  char *c = 0;
  c = domString.transcode();
  cout << "transcode() : " << c << endl; 
}

compiled on SuSE LINUX 7.3 , g++ 2.95.2

g++ -g -I/usr/opt/xalan-c-1_3/c/src -I/opt/xerces-c-1_6_0/include  -c
transcode.cc -o transcode.o
g++ -o transcode transcode.o -L/usr/opt/xalan-c-1_3/c/lib
-L/opt/xerces-c-1_6_0/lib -lxalan-c1_3 -lxerces-c1_6_0 -lm -lpthread 
%
./transcode 
transcode() : 
%

compiled on compaq true64 V5.1

cxx -g -I/usr/opt/xalan-c-1_3/c/src -I/usr/opt/xerces-c-1_6_0/src  -c
transcode.cc -o transcode.o
cxx -o transcode transcode.o -L/usr/opt/xalan-c-1_3/c/lib
-L/usr/opt/xerces-c-1_6_0/lib -lxalan-c1_3 -lxerces-c1_6_0 -lm -lpthread 
%
./transcode 
transcode() : [°C]
%

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

Reply via email to