[
https://issues.apache.org/jira/browse/LOGCXX-325?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Thorsten Schöning updated LOGCXX-325:
-------------------------------------
Priority: Minor (was: Trivial)
> Multibyte character support for PropertyResourceBundle
> ------------------------------------------------------
>
> Key: LOGCXX-325
> URL: https://issues.apache.org/jira/browse/LOGCXX-325
> Project: Log4cxx
> Issue Type: Improvement
> Affects Versions: 0.10.0
> Environment: Not relevant.
> Reporter: Jordan Angold
> Assignee: Curt Arnold
> Priority: Minor
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> PropertyResourceBundle uses Properties, which specifies that the file it
> loads from must be in ISO 8859-1 (Latin-1); this is similar to the Java API
> specification. However, the Java API also permits the use of Unicode escaping
> ( \u#### ) whereas log4cxx does not appear to.
> In order to have satisfactory i18n support, log4cxx must be able to read
> unicode characters, as Latin-1 is only applicable to a handful of
> mostly-Western languages. A simple fix for users who need this support is to
> edit properties.cpp, find the load() method and change
> CharsetDecoder::getISOLatinDecoder() to CharsetDecoder::getUTF8Decoder(); I
> have not run log4cxx's tests to verify this, but the output appears correct.
> A more comprehensive change is to either add a configuration option, perhaps
> --with-bundlechars={utf-8, latin-1, auto...} to change the type of decoder
> selected, or to overload ResourceBundle::getBundle() to give an extra option
> to choose the input format. The second provides the user with greater
> flexibility as they can have multiple log files encoded differently, but may
> require more effort.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)