felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Barthel (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FELIX-4416) CFG file encoding
Date Tue, 04 Mar 2014 06:59:20 GMT

    [ https://issues.apache.org/jira/browse/FELIX-4416?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13919065#comment-13919065

Uwe Barthel commented on FELIX-4416:

Properties are always defined in ISO-8859-1.
See http://docs.oracle.com/javase/7/docs/api/java/util/Properties.html.

For use another Characterset instead of ISO-8859-1, the properties files has to prepare with
native2ascii tool provided by JDK.

> CFG file encoding
> -----------------
>                 Key: FELIX-4416
>                 URL: https://issues.apache.org/jira/browse/FELIX-4416
>             Project: Felix
>          Issue Type: Bug
>          Components: File Install
>    Affects Versions: fileinstall-3.2.6
>         Environment: Karaf 2.3.3
>            Reporter: Alexandre Cartapanis
> FileInstall always use ISO-8859-1 for reading cfg file, even if the CFG file is not encoded
in ISO-8859-1.
> So when the CFG file contains non-ascii characters, those characters are "transformed"
during parsing. Typically my file contains the line "error.message.210=Identifiant d'entité
cible invalide" (without the "") but after FileInstall parsing, my string is transformed into
"Identifiant d'entité cible invalide" (still without the "").
> The org.apache.felix.utils.properties.Properties class has a default encoding defined
to ISO-8859-1,which is always used whatever the actual file encoding is.

This message was sent by Atlassian JIRA

View raw message