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

Aaron Digulla commented on MRESOURCES-171:
------------------------------------------

[~afloom] Thanks for the update.

(screaming and cursing in the background). Ahem. Seems like a bad situation got 
worse.

One way to attack this: Determine Java version and set the default accordingly 
(ISO for < Java 9, UTF-8 for everything later). Log the setting to the console 
so developers notice that something is happening.

But a better approach would be to add a new property and print a warning when 
it's not set (that's what happening when source encoding is missing, IIRC). 
That would allow us to print a link to a web page with instructions.

I think the last option is best: It makes the problem obvious (especially for 
those so far oblivious to it), it will help those who have installed 
workarounds and we can explain what's going on AND give suggestions for common 
cases.

> 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