[
https://jira.duraspace.org/browse/DS-1528?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=27999#comment-27999
]
Mark H. Wood commented on DS-1528:
----------------------------------
I agree with that guess. I'm convinced that Maven does not do this conversion.
Serialized Properties are always treated as 8859-1 encoding unless the
Properties object is specifically configured otherwise before loading.
Internally, Java Strings are UCS-16, so Properties has to transcode during
load(InputStream). (When using load(Reader) this just pushes the problem into
Reader, which has to do the transcoding because it too returns UCS-16.)
It seems to me that project.build.sourceEncoding only applies to files *read by
Maven*. Maven does not read .properties files itself, I suppose, but as with
pretty much every other Java program delegates that to java.util.Properties,
which has other rules.
I'm convinced that by the time maven-resources-plugin gets the properties that
it is to interpolate, they have already been transcoded and the plugin can only
trust that they contain the Strings that we wanted.
The question, therefore, seems to be: how do we tell Maven to configure the
relevant Properties with an encoding of our choice? There may not (yet) be any
way to do that. We may have to submit a patch to Maven. What Maven component
is reading these? They eventually come through <build><filters>. What reads
the files specified in <filters> and how do we configure an encoding on that?
> 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
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-devel