[ 
https://jira.duraspace.org/browse/DS-1528?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=27994#comment-27994
 ] 

Tim Donohue commented on DS-1528:
---------------------------------

I'm stumped as to what is going on here.  Best I can tell, nearly all Maven 
plugins *should* obey this configuration (which is in our main pom.xml):

<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

This is documented by Maven as the proper way to set UTF-8 encoding across 
plugins: 
http://docs.codehaus.org/display/MAVENUSER/POM+Element+for+Source+File+Encoding

When you run "mvn package" for DSpace, Maven also reports that it is *always* 
using UTF-8 to copy resources...you'll see messages like this one:

[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ xmlui ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.

I've also tried specifically setting various plugins (which copy/move around 
files) to UTF-8 encoding (specifically the maven-resource-plugin and 
maven-assembly-plugin).  This has no effect -- any UTF-8 special characters in 
build.properties still end up garbled in 
[src]/dspace/target/dspace-[version]/config/dspace.cfg

I've also tried setting MAVEN_OPTS="-Dfile.encoding=UTF-8", but this also has 
no effect.

I did run across an *identical report* on the web (with no solution): 
http://stackoverflow.com/questions/14327003/wrong-encoding-after-activating-resource-filtering
   I've verified that if you set 
"<project.build.sourceEncoding>ISO-8859-1</project.build.sourceEncoding>" in 
our main pom.xml, then filtering of special characters WORKS (at least for 
valid ISO-8859-1 special characters).  But, obviously that's not what we want.

I'm not sure how to proceed, but wanted to note what I've tried so far with no 
success.
                
> build.properties doesn't support UTF-8 encoding
> -----------------------------------------------
>
>                 Key: DS-1528
>                 URL: https://jira.duraspace.org/browse/DS-1528
>             Project: DSpace
>          Issue Type: Bug
>    Affects Versions: 3.0, 3.1
>            Reporter: Tim Donohue
>            Priority: Major
>             Fix For: 3.2
>
>
> This is related to DS-1469
> When UTF-8 characters are placed in the build.properties file, they are 
> improperly filtered into the final dspace.cfg file.
> This seems to be the fault of the maven-resources-plugin.  However, according 
> to it's documentation, it is supposed to support UTF-8 encoding:
> http://maven.apache.org/plugins/maven-resources-plugin/examples/encoding.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
_______________________________________________
Dspace-devel mailing list
Dspace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-devel

Reply via email to