[ 
https://issues.apache.org/jira/browse/MRESOURCES-171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17158151#comment-17158151
 ] 

Dennis Lundberg commented on MRESOURCES-171:
--------------------------------------------

[~afloom] While I agree that convention over configuration is good, I feel that 
automatic detection is out of scope for this particular issue. This issue 
currently affects anyone having project.build.sourceEncoding=UTF-8 and 
filtering properties files (encoded in ISO-8859-1) containing non-ascii content.

Thanks for your feedback [~digulla].
Are you suggesting that the proposed new parameter "propertiesEncoding" should 
default to ISO-8859-1 instead of project.build.sourceEncoding? That would be 
good for those who haven't yet discovered that their properties files are being 
mangled if filtered. It also means that we are changing the behavior of the 
plugin, but to a more correct one.

Those who have implemented their own UTF-8-aware properties file handling will 
need to change manually set propertiesEncoding to UTF-8. But I suspect those 
are in minority here.

> ISO8859-1 properties files get changed into UTF-8 when filtered
> ---------------------------------------------------------------
>
>                 Key: MRESOURCES-171
>                 URL: https://issues.apache.org/jira/browse/MRESOURCES-171
>             Project: Maven Resources Plugin
>          Issue Type: Bug
>          Components: filtering
>            Reporter: Alex Collins
>            Priority: Minor
>         Attachments: filtering-bug.zip
>
>
> Create:
> src/main/resources/test.properties
> And add a ISO8859-1 character that is not ASCII or UTF-8, do not use \uXXXX 
> formatting.
> When adding this line:
> <resource><directory>src/main/resources</directory><filtering>true</filtering></resource>
> Expected:
> ISO8859-1 encoded file in jar.
> Actual:
> UTF-8 encoded file in jar.
> ---
> If there are any property files (which can only be ISO8859-1) they appear to 
> be converted into UTF-8 in the jar.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to