[ 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