Title: transcoding error while opening file

Hi Guys,

I am using xerces-c1_3_0-win32, and when attempting to call LocalFileInputSource(const XMLCh* const filepath), I get an error right at the point where I attempt to open my xml file. 

I later discovered that the transcoder  in XMLPlatformUtils::openFile(fileName) returns gibberish rather than the file as a string.  The transcoder works if I send the file name as "personal.xml" without its path.  But once its path is included, then the transcoding doesn't work. 

This filepath I am using is "D:\projects\TranBack Siehnai XML\xerces-c1_3_0-win32\bin\personal.xml".


Here's the section in scanFirst() where my program bombs:

BinFileInputStream::BinFileInputStream(const XMLCh* const fileName) :

    fSource(0)
{
    // Try to open the file
    fSource = XMLPlatformUtils::openFile(fileName);
}


Within XMLPlatformUtils::openFile(fileName) here's the piece of code that returns gibberish:

char* tmpName = XMLString::transcode(nameToOpen);


resulting contents of tmpName:
-       tmpName 0x00c25270 "�������������������������������������"



Also, if I want to use my xml file's filepath as the base path with no relative path, do I call the specific LocalFileInputSource function by using 0 as the relative path parameter?:

E.g:
LocalFileInputSource(const XMLCh* const myFilePath, 0)



Thanks,


Siehnai Williamson

Reply via email to