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

2014-10-10 Thread Aaron Digulla (JIRA)

[ 
https://jira.codehaus.org/browse/MRESOURCES-171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=354160#comment-354160
 ] 

Aaron Digulla commented on MRESOURCES-171:
--

@Karl-Heinz Marbaise: What would be a correct/working POM which just applied 
this encoding to property files and use the default encoding for everything 
else?

I'd suggest to use the encoding iso-8859-1 for copying and resource filtering 
since it's a 1:1 encoding (each byte just passes through) but that doesn't work 
when the resource plugin expands a variable with a value that contains Unicode 
characters (code point  256) since those can't be mapped to iso-8859-1 
anymore. So we would have a situation where most parts of a file would make it 
into the target folder unscathed but in some corner cases, it would fail.

 ISO8859-1 properties files get changed into UTF-8 when filtered
 ---

 Key: MRESOURCES-171
 URL: https://jira.codehaus.org/browse/MRESOURCES-171
 Project: Maven Resources Plugin
  Issue Type: Bug
  Components: filtering
Reporter: Alex Collins
Priority: Minor
 Fix For: backlog

 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 \u 
 formatting.
 When adding this line:
 resourcedirectorysrc/main/resources/directoryfilteringtrue/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
(v6.1.6#6162)


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

2014-10-09 Thread Karl-Heinz Marbaise (JIRA)

[ 
https://jira.codehaus.org/browse/MRESOURCES-171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=354118#comment-354118
 ] 

Karl-Heinz Marbaise commented on MRESOURCES-171:


It's also possible to use a separate execution of the maven-resources-plugin 
with the copy-resources goal like this with different encoding:
{code:xml}
 executions
  execution
idcopy-resources/id
phasegenerate-resources/phase
goals
  goalcopy-resources/goal
/goals
configuration
  encodingWhatEver/encoding
  
outputDirectory${basedir}/target/extra-resources/outputDirectory
  resources  
resource
  directorysrc/non-packaged-resources/directory
  filteringtrue/filtering
/resource
  /resources  
/configuration
  /execution
/executions
{code}

 ISO8859-1 properties files get changed into UTF-8 when filtered
 ---

 Key: MRESOURCES-171
 URL: https://jira.codehaus.org/browse/MRESOURCES-171
 Project: Maven Resources Plugin
  Issue Type: Bug
  Components: filtering
Reporter: Alex Collins
Priority: Minor
 Fix For: backlog

 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 \u 
 formatting.
 When adding this line:
 resourcedirectorysrc/main/resources/directoryfilteringtrue/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
(v6.1.6#6162)


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

2014-06-29 Thread Karl-Heinz Marbaise (JIRA)

 [ 
https://jira.codehaus.org/browse/MRESOURCES-171?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Karl-Heinz Marbaise updated MRESOURCES-171:
---

Fix Version/s: backlog

 ISO8859-1 properties files get changed into UTF-8 when filtered
 ---

 Key: MRESOURCES-171
 URL: https://jira.codehaus.org/browse/MRESOURCES-171
 Project: Maven Resources Plugin
  Issue Type: Bug
  Components: filtering
Reporter: Alex Collins
Priority: Minor
 Fix For: backlog

 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 \u 
 formatting.
 When adding this line:
 resourcedirectorysrc/main/resources/directoryfilteringtrue/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
(v6.1.6#6162)


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

2014-04-16 Thread Aaron Digulla (JIRA)

[ 
https://jira.codehaus.org/browse/MRESOURCES-171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=345029#comment-345029
 ] 

Aaron Digulla commented on MRESOURCES-171:
--

I just stumbled over the same issue.

Background: Property files need to use ISO-8859-1 as encoding as per [the 
docs|http://docs.oracle.com/javase/7/docs/api/java/util/Properties.html]:

{quote}
except the input/output stream is encoded in ISO 8859-1 character encoding
{quote}

 Note: This is only true for the simple line-oriented properties file format, 
not the XML version!

This becomes a problem when the default encoding 
{{project.build.sourceEncoding}} is set to something else because the resource 
plugin will try to load the files with this encoding (ignoring the Java 
standard) which garbles the input when it contains non-ASCII characters like 
öäü.

IDE usually get this right by ignoring the project's defaults for these files 
and enforcing ISO-8859-1 for {{*.properties}} files.

I see two solutions:

# Configure the resource plugin to ignore those files (which is bad since then, 
we can't replace variables in them anymore)
# Offer a per-file-type encoding

That way, one could say:

{code}
configuration
  filetypes
  filetype
  encodingiso-8859-1/encoding
  pattern*.properties/pattern
  /filetype
  /filetypes
/configuration
{code}

I'd even opt for this to be the default.

 ISO8859-1 properties files get changed into UTF-8 when filtered
 ---

 Key: MRESOURCES-171
 URL: https://jira.codehaus.org/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 \u 
 formatting.
 When adding this line:
 resourcedirectorysrc/main/resources/directoryfilteringtrue/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
(v6.1.6#6162)


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

2012-12-10 Thread Alex Collins (JIRA)

[ 
https://jira.codehaus.org/browse/MRESOURCES-171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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 \u 
 formatting.
 When adding this line:
 resourcedirectorysrc/main/resources/directoryfilteringtrue/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

2012-12-10 Thread Anders Hammar (JIRA)

[ 
https://jira.codehaus.org/browse/MRESOURCES-171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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 \u 
 formatting.
 When adding this line:
 resourcedirectorysrc/main/resources/directoryfilteringtrue/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

2012-12-10 Thread Alex Collins (JIRA)

[ 
https://jira.codehaus.org/browse/MRESOURCES-171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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 \u 
 formatting.
 When adding this line:
 resourcedirectorysrc/main/resources/directoryfilteringtrue/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

2012-12-04 Thread Alex Collins (JIRA)
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 \u 
formatting.

When adding this line:

resourcedirectorysrc/main/resources/directoryfilteringtrue/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

2012-12-04 Thread Anders Hammar (JIRA)

[ 
https://jira.codehaus.org/browse/MRESOURCES-171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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 \u 
 formatting.
 When adding this line:
 resourcedirectorysrc/main/resources/directoryfilteringtrue/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

2012-12-04 Thread Anders Hammar (JIRA)

[ 
https://jira.codehaus.org/browse/MRESOURCES-171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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 \u 
 formatting.
 When adding this line:
 resourcedirectorysrc/main/resources/directoryfilteringtrue/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

2012-12-04 Thread Kristian Rosenvold (JIRA)

[ 
https://jira.codehaus.org/browse/MRESOURCES-171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=314957#comment-314957
 ] 

Kristian Rosenvold commented on MRESOURCES-171:
---

Is project encoding set in your pom ?  
properties
project.build.sourceEncodingUTF-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 \u 
 formatting.
 When adding this line:
 resourcedirectorysrc/main/resources/directoryfilteringtrue/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

2012-12-04 Thread Kristian Rosenvold (JIRA)

[ 
https://jira.codehaus.org/browse/MRESOURCES-171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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.sourceEncodingISO-8859-1/project.build.sourceEncoding
/properties


  was (Author: krosenvold):
Is project encoding set in your pom ?  
properties
project.build.sourceEncodingUTF-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 \u 
 formatting.
 When adding this line:
 resourcedirectorysrc/main/resources/directoryfilteringtrue/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

2012-12-04 Thread Alex Collins (JIRA)

 [ 
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 filteringfalse/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 \u 
 formatting.
 When adding this line:
 resourcedirectorysrc/main/resources/directoryfilteringtrue/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

2012-12-04 Thread Alex Collins (JIRA)

[ 
https://jira.codehaus.org/browse/MRESOURCES-171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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 \u 
 formatting.
 When adding this line:
 resourcedirectorysrc/main/resources/directoryfilteringtrue/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

2012-12-04 Thread Kristian Rosenvold (JIRA)

[ 
https://jira.codehaus.org/browse/MRESOURCES-171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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 \u 
 formatting.
 When adding this line:
 resourcedirectorysrc/main/resources/directoryfilteringtrue/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

2012-12-04 Thread Alex Collins (JIRA)

[ 
https://jira.codehaus.org/browse/MRESOURCES-171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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

- 61 63 74 75  61 6C 3D 4E  6F 20 68 61  79 20 63 6F [actual=No hay co]
0001- 6E 65 78 69  F3 6E 0D 0A  65 78 70 65  63 74 65 64 [nexi.n..expected]
0002- 3D 4E 6F 20  68 61 79 20  63 6F 6E 65  78 69 5C 75 [=No hay conexi\u]
0003- 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

- 61 63 74 75  61 6C 3D 4E  6F 20 68 61  79 20 63 6F [actual=No hay co]
0001- 6E 65 78 69  EF BF BD 6E  0D 0A 65 78  70 65 63 74 [nexi...n..expect]
0002- 65 64 3D 4E  6F 20 68 61  79 20 63 6F  6E 65 78 69 [ed=No hay conexi]
0003- 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 \u 
 formatting.
 When adding this line:
 resourcedirectorysrc/main/resources/directoryfilteringtrue/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

2012-12-04 Thread Anders Hammar (JIRA)

[ 
https://jira.codehaus.org/browse/MRESOURCES-171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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 \u 
 formatting.
 When adding this line:
 resourcedirectorysrc/main/resources/directoryfilteringtrue/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