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 2007/03/06 09:20:24 UTC

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

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

Alberto Massari resolved XERCESC-1660.
--------------------------------------

    Resolution: Fixed

Your patch is in SVN. Plase verify.

Alberto

> IconvGNU and IconvFBSD transcoders override application-set locale
> ------------------------------------------------------------------
>
>                 Key: XERCESC-1660
>                 URL: https://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.
-
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