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 "Boris Kolpackov (JIRA)" <xe...@xml.apache.org> on 2009/11/04 11:33:40 UTC

[jira] Closed: (XERCESC-1731) Open file failed on MIPS because chForwardSlash in wrong byte-order

     [ https://issues.apache.org/jira/browse/XERCESC-1731?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Boris Kolpackov closed XERCESC-1731.
------------------------------------

       Resolution: Fixed
    Fix Version/s: 3.0.1

I believe this has been fixed in 3.0.1.

> Open file failed on MIPS because chForwardSlash in wrong byte-order
> -------------------------------------------------------------------
>
>                 Key: XERCESC-1731
>                 URL: https://issues.apache.org/jira/browse/XERCESC-1731
>             Project: Xerces-C++
>          Issue Type: Bug
>          Components: Utilities
>    Affects Versions: 2.7.0
>         Environment: MIPS 
> Linux 2.6.16
> GNU iconv
>            Reporter: Yunhai Zhang
>            Priority: Critical
>             Fix For: 3.0.1
>
>
> We try to migrate some code to MIPS paltform, and got a failer while parsing an xml file using xerces-c++.
> So we check the code and found that when a LocalFileInputSource is constructed, the file name is composed as following:
>         XMLString::copyString(fullDir, curDir);
>         fullDir[curDirLen] = chForwardSlash;
>         XMLString::copyString(&fullDir[curDirLen+1], filePath);
> and chForwardSlash is define as following:         
>         const XMLCh chForwardSlash          = 0x2F;
> In our MIPS platform, this variant is in big-endian, but curDir and filePath are in little-endian, so we got a wrong fullDir.
> The reason why curDir and filePath are in little-endian is that IconvGNUTranscoder only use little-endian transecoder:
> static const IconvGNUEncoding    gIconvGNUEncodings[] = {
>     { "UCS-2LE",        2,    LITTLE_ENDIAN },
>     { "ucs-2-internal",        2,    LITTLE_ENDIAN },
>     { NULL, 0,    0 }
> };
> When we add  { "UCS-2BE",        2,    BIG_ENDIAN } to gIconvGNUEncodings, everything is OK.
> Is this an intended behavior or a bug?  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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