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 "Alberto Massari (JIRA)" <xe...@xml.apache.org> on 2006/12/30 16:24:21 UTC

[jira] Commented: (XERCESC-1660) IconvGNU and IconvFBSD transcoders override application-set locale

    [ http://issues.apache.org/jira/browse/XERCESC-1660?page=comments#action_12461505 ] 
            
Alberto Massari commented on XERCESC-1660:
------------------------------------------

Hi Boris,
as you are contributing several bug fixes and patches, would you mind filing a corporate CLA as stated in the  section 7 of the Xerces Charter at http://xerces.apache.org/charter.html? That would make easier for us to commit your patches.

Thanks,
Alberto


> IconvGNU and IconvFBSD transcoders override application-set locale
> ------------------------------------------------------------------
>
>                 Key: XERCESC-1660
>                 URL: http://issues.apache.org/jira/browse/XERCESC-1660
>             Project: Xerces-C++
>          Issue Type: Bug
>          Components: Utilities
>    Affects Versions: 2.7.0
>         Environment: any
>            Reporter: Boris Kolpackov
>         Attachments: setlocale.patch
>
>
> When IconvGNU and IconvFBSD transcoders try to figure out the local code page, they call setlocale with an empty string as a second argument. This results in an implementation-specific action which usually consist of querying a set of environment variables and overriding the current locale with the result. This is obviously wrong since Xerces-C++ has no business changing the default application locale. Out of curiosity I checked how things are done in ICU. I found the following comment in the the source code:
> "Do not call setlocale(LC_*, "")! Using an empty string instead of NULL, will modify the libc behavior."
> I came up with a patch that addresses this issue as well as makes the detection code more robust.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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