You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Alex Collins (JIRA)" <ji...@codehaus.org> on 2012/12/04 12:56:13 UTC

[jira] (MRESOURCES-171) ISO8859-1 properties files get changed into UTF-8 when filtered

Alex Collins created MRESOURCES-171:
---------------------------------------

             Summary: ISO8859-1 properties files get changed into UTF-8 when filtered
                 Key: MRESOURCES-171
                 URL: https://jira.codehaus.org/browse/MRESOURCES-171
             Project: Maven 2.x Resources Plugin
          Issue Type: Bug
          Components: filtering
            Reporter: Alex Collins
            Priority: Minor


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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MRESOURCES-171) ISO8859-1 properties files get changed into UTF-8 when filtered

Posted by "Alex Collins (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MRESOURCES-171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=315324#comment-315324 ] 

Alex Collins commented on MRESOURCES-171:
-----------------------------------------

Ah. I have choose a confusing example. My properties files are in ISO-8859-1 (as they cannot be anything else, e.g. http://stackoverflow.com/questions/4659929/how-to-use-utf-8-in-resource-properties-with-resourcebundle, side-note: spot  the hacky solution suggested further down the page - yuk). If I converted them to UTF-8, they would be invalid. But this is perhaps a red herring. I'm not reporting that it's failing to make a special case for properties files.

Firstly, I'm saying is if you set the source encoding then when they are filtered, they are converted ***from ISO-8859-1*** into UTF-8. But I've set the source encoding as UTF-8! It shouldn't do any conversion at all, regardless of the fact they're in the wrong encoding. It's directly contravening the configuration. They should be not be converted! I have told the plugin that they are already in UTF-8, it should go "OK the file is in UTF-8". Not "it looks odd, I'll do some silent and un-requested conversion for them".

Additionally, the "source encoding" should only affect the treatment of source files, but it appears to affect the treatment of the "target files". If a properties file is going into a jar, it MUST be ISO-8599-1!!! But the plugin knowingly causes a faulty jar file. Perhaps Maven's lacking a project.build.targetEncoding property?
 
If you need to convince yourself, try creating a properties file with a sequence of non-ASCII characters that is valid in both UTF-8 ISO-8859-1 (if this is possible, which it might not be).
                
> ISO8859-1 properties files get changed into UTF-8 when filtered
> ---------------------------------------------------------------
>
>                 Key: MRESOURCES-171
>                 URL: https://jira.codehaus.org/browse/MRESOURCES-171
>             Project: Maven 2.x 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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MRESOURCES-171) ISO8859-1 properties files get changed into UTF-8 when filtered

Posted by "Alex Collins (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MRESOURCES-171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=315320#comment-315320 ] 

Alex Collins commented on MRESOURCES-171:
-----------------------------------------

OK. So we've established that filtering changes the encoding. We've also established that this is inconsistent as it is a side-effect of filtering; unfiltered resources are unchanged. Finally, filtering understands "source encoding" as "target encoding" as this is the encoding it converts files into; if it understood it as source encoding, then it would not have to change the encoding.




                
> ISO8859-1 properties files get changed into UTF-8 when filtered
> ---------------------------------------------------------------
>
>                 Key: MRESOURCES-171
>                 URL: https://jira.codehaus.org/browse/MRESOURCES-171
>             Project: Maven 2.x 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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MRESOURCES-171) ISO8859-1 properties files get changed into UTF-8 when filtered

Posted by "Alex Collins (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MRESOURCES-171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=314973#comment-314973 ] 

Alex Collins commented on MRESOURCES-171:
-----------------------------------------

Interesting:

- In IntelliJ, choose file/settings/file encodings and set "Default encoding for property files" to "UTF-8".
- Choose Build/Rebuild.
- Run test in IntelliJ - test fails.
- Run "mvn clean test". 
- Test fails.
- Changed filtering=true to filtering=false.
- Re-build.
- Re-run test in IntelliJ.
- Test passes.
- Run "mvn clean test".
- Test passes.

Expected:

Not sure what to expect here. 

Is it reasonable to expect that a filtered file that does not have any properties to filter should be identical to that file unfiltered?

$ stat  src/main/resources/test.properties
  File: `src/main/resources/test.properties'
  Size: 53
...

stat target/classes/test.properties
  File: `target/classes/test.properties'
  Size: 55            
..

Files are different sizes after filtering.

$ hexdump  src/main/resources/test.properties
HEXDUMP of Mon, 13 Jun 2005, copyright (c) 2005 by Rich Pasco
C:\Users\alex.collins\Documents\11841\filtering-bug\src\main\resources\test.properties  53 bytes   12/04/2012  12:43:04

          -0 -1 -2 -3  -4 -5 -6 -7  -8 -9 -A -B  -C -D -E -F

00000000- 61 63 74 75  61 6C 3D 4E  6F 20 68 61  79 20 63 6F [actual=No hay co]
00000001- 6E 65 78 69  F3 6E 0D 0A  65 78 70 65  63 74 65 64 [nexi.n..expected]
00000002- 3D 4E 6F 20  68 61 79 20  63 6F 6E 65  78 69 5C 75 [=No hay conexi\u]
00000003- 30 30 66 33  6E                                    [00f3n           ]

$ hexdump  target/classes/test.properties
HEXDUMP of Mon, 13 Jun 2005, copyright (c) 2005 by Rich Pasco
C:\Users\alex.collins\Documents\11841\filtering-bug\target\classes\test.properties  55 bytes   12/04/2012  13:12:32

          -0 -1 -2 -3  -4 -5 -6 -7  -8 -9 -A -B  -C -D -E -F

00000000- 61 63 74 75  61 6C 3D 4E  6F 20 68 61  79 20 63 6F [actual=No hay co]
00000001- 6E 65 78 69  EF BF BD 6E  0D 0A 65 78  70 65 63 74 [nexi...n..expect]
00000002- 65 64 3D 4E  6F 20 68 61  79 20 63 6F  6E 65 78 69 [ed=No hay conexi]
00000003- 5C 75 30 30  66 33 6E                              [\u00f3n         ]

Files contain different data after filtering.
                
> ISO8859-1 properties files get changed into UTF-8 when filtered
> ---------------------------------------------------------------
>
>                 Key: MRESOURCES-171
>                 URL: https://jira.codehaus.org/browse/MRESOURCES-171
>             Project: Maven 2.x 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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MRESOURCES-171) ISO8859-1 properties files get changed into UTF-8 when filtered

Posted by "Alex Collins (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MRESOURCES-171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=314968#comment-314968 ] 

Alex Collins commented on MRESOURCES-171:
-----------------------------------------

Note, if you run the tests in IntelliJ, then the test always passes. IntelliJ does not does with encodings the same way.
                
> ISO8859-1 properties files get changed into UTF-8 when filtered
> ---------------------------------------------------------------
>
>                 Key: MRESOURCES-171
>                 URL: https://jira.codehaus.org/browse/MRESOURCES-171
>             Project: Maven 2.x 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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MRESOURCES-171) ISO8859-1 properties files get changed into UTF-8 when filtered

Posted by "Anders Hammar (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MRESOURCES-171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=314959#comment-314959 ] 

Anders Hammar commented on MRESOURCES-171:
------------------------------------------

See http://maven.apache.org/plugins/maven-resources-plugin/resources-mojo.html#encoding
                
> ISO8859-1 properties files get changed into UTF-8 when filtered
> ---------------------------------------------------------------
>
>                 Key: MRESOURCES-171
>                 URL: https://jira.codehaus.org/browse/MRESOURCES-171
>             Project: Maven 2.x Resources Plugin
>          Issue Type: Bug
>          Components: filtering
>            Reporter: Alex Collins
>            Priority: Minor
>
> 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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MRESOURCES-171) ISO8859-1 properties files get changed into UTF-8 when filtered

Posted by "Kristian Rosenvold (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MRESOURCES-171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=314957#comment-314957 ] 

Kristian Rosenvold commented on MRESOURCES-171:
-----------------------------------------------

Is project encoding set in your pom ?  
<properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

                
> ISO8859-1 properties files get changed into UTF-8 when filtered
> ---------------------------------------------------------------
>
>                 Key: MRESOURCES-171
>                 URL: https://jira.codehaus.org/browse/MRESOURCES-171
>             Project: Maven 2.x Resources Plugin
>          Issue Type: Bug
>          Components: filtering
>            Reporter: Alex Collins
>            Priority: Minor
>
> 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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MRESOURCES-171) ISO8859-1 properties files get changed into UTF-8 when filtered

Posted by "Kristian Rosenvold (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MRESOURCES-171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=314957#comment-314957 ] 

Kristian Rosenvold edited comment on MRESOURCES-171 at 12/4/12 5:59 AM:
------------------------------------------------------------------------

Is project encoding set in your pom ?  
<properties>
        <project.build.sourceEncoding>ISO-8859-1</project.build.sourceEncoding>
</properties>

                
      was (Author: krosenvold):
    Is project encoding set in your pom ?  
<properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

                  
> ISO8859-1 properties files get changed into UTF-8 when filtered
> ---------------------------------------------------------------
>
>                 Key: MRESOURCES-171
>                 URL: https://jira.codehaus.org/browse/MRESOURCES-171
>             Project: Maven 2.x Resources Plugin
>          Issue Type: Bug
>          Components: filtering
>            Reporter: Alex Collins
>            Priority: Minor
>
> 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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MRESOURCES-171) ISO8859-1 properties files get changed into UTF-8 when filtered

Posted by "Anders Hammar (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MRESOURCES-171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=314958#comment-314958 ] 

Anders Hammar commented on MRESOURCES-171:
------------------------------------------

I'm guessing this is controlled by the project.build.sourceEncoding property in the pom. Is that set to UTF-8?
                
> ISO8859-1 properties files get changed into UTF-8 when filtered
> ---------------------------------------------------------------
>
>                 Key: MRESOURCES-171
>                 URL: https://jira.codehaus.org/browse/MRESOURCES-171
>             Project: Maven 2.x Resources Plugin
>          Issue Type: Bug
>          Components: filtering
>            Reporter: Alex Collins
>            Priority: Minor
>
> 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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MRESOURCES-171) ISO8859-1 properties files get changed into UTF-8 when filtered

Posted by "Kristian Rosenvold (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MRESOURCES-171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=314970#comment-314970 ] 

Kristian Rosenvold commented on MRESOURCES-171:
-----------------------------------------------

You mean File | Settings | File Encodings -> IDE Encoding does not affect your test ?
                
> ISO8859-1 properties files get changed into UTF-8 when filtered
> ---------------------------------------------------------------
>
>                 Key: MRESOURCES-171
>                 URL: https://jira.codehaus.org/browse/MRESOURCES-171
>             Project: Maven 2.x 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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MRESOURCES-171) ISO8859-1 properties files get changed into UTF-8 when filtered

Posted by "Anders Hammar (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MRESOURCES-171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=315322#comment-315322 ] 

Anders Hammar commented on MRESOURCES-171:
------------------------------------------

I'm not sure I understand the problem. If you have configured your source encoding to UTF-8, you should only use UTF-8 char encoding in your resources. The default settings of the resources plugin will then use that encoding (UTF-8) as the target encoding, which is the correct behavior IMO.
I think you have the wrong encoding in the source file and that's the problem.
                
> ISO8859-1 properties files get changed into UTF-8 when filtered
> ---------------------------------------------------------------
>
>                 Key: MRESOURCES-171
>                 URL: https://jira.codehaus.org/browse/MRESOURCES-171
>             Project: Maven 2.x 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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MRESOURCES-171) ISO8859-1 properties files get changed into UTF-8 when filtered

Posted by "Anders Hammar (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MRESOURCES-171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=314974#comment-314974 ] 

Anders Hammar commented on MRESOURCES-171:
------------------------------------------

{quote}
Is it reasonable to expect that a filtered file that does not have any properties to filter should be identical to that file unfiltered?
{quote}

Not necessarily. The filtering process will take place regardless and it is a string operation which will use the encoding configured for the plugin.
                
> ISO8859-1 properties files get changed into UTF-8 when filtered
> ---------------------------------------------------------------
>
>                 Key: MRESOURCES-171
>                 URL: https://jira.codehaus.org/browse/MRESOURCES-171
>             Project: Maven 2.x 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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MRESOURCES-171) ISO8859-1 properties files get changed into UTF-8 when filtered

Posted by "Alex Collins (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MRESOURCES-171?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alex Collins updated MRESOURCES-171:
------------------------------------

    Attachment: filtering-bug.zip

Test 1
---
- Run "mvn test" and see test error. 
- Change <filtering>false</filtering> from pom.xml>
- Re- "mvn test".

Expected: 

Test passes both times, or some error.

Actual:

Test fails first time (when filtering=true).

Test 2
---
- Set filtering true.
- Execute:

file src/main/resources/test.properties
file target/filtering-bug-1.0/test.properties
target/filtering-bug-1.0/test.properties: 

Expected:

Both files some encoding.

Actual:

Files different encodings.
                
> ISO8859-1 properties files get changed into UTF-8 when filtered
> ---------------------------------------------------------------
>
>                 Key: MRESOURCES-171
>                 URL: https://jira.codehaus.org/browse/MRESOURCES-171
>             Project: Maven 2.x 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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira