[ 
https://issues.apache.org/jira/browse/DOXIASITETOOLS-87?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15174322#comment-15174322
 ] 

Michael Osipov edited comment on DOXIASITETOOLS-87 at 3/1/16 8:11 PM:
----------------------------------------------------------------------

There is a flaw with this implementation. Since the file encoding is not known, 
the implemenation blindly assumes that CR and LF are encoding with a single 
byte. This is deemed to fail if the resources are UTF-16/32 encoded which is 
common for Asia.

I think this should be reverted for now and resolved with a better approach 
DOXIASITETOOLS-88. Additionally, this should not be done at Velocity level 
because it is not a Velocity problem but purely a {{SiteRenderer}} one. We 
could simply write a {{NormalizingWriter}}, this should do.


was (Author: michael-o):
There is a flaw with this implementation. Since the file encoding is not known, 
the implemenation blindly assumes that CR and LF are encoding with a single 
byte. This is deemed to fail if the resources are UTF-16/32 encoded which is 
common for Asia.

I think this should be reverted for now and resolved with a better approach 
DOXIASITETOOLS-88. Additionally, this should not be done at Velocity level 
because it is not a Velocity problem but purely a {{SiteRenderer}} one.

> inconsistent newlines between template content from skin and generated content
> ------------------------------------------------------------------------------
>
>                 Key: DOXIASITETOOLS-87
>                 URL: https://issues.apache.org/jira/browse/DOXIASITETOOLS-87
>             Project: Maven Doxia Sitetools
>          Issue Type: Bug
>          Components: Site renderer
>            Reporter: Hervé Boutemy
>            Assignee: Hervé Boutemy
>             Fix For: 1.6
>
>
> template from skin artifact is read with newline set from skin artifact 
> builder
> then content is added into it with current newline, which can be different 
> from artifact builder
> Template newline should be harmonized with current newline
> this causes MSITE-121 and requires hack in 
> [maven-scm-publish-plugin|http://maven.apache.org/plugins/maven-scm-publish-plugin/]
>  ([copyAndNormalizeNewlines( File srcFile, File destFile 
> )|http://maven.apache.org/plugins-archives/maven-scm-publish-plugin-1.0-beta-2/xref/org/apache/maven/plugins/scmpublish/ScmPublishPublishScmMojo.html#180])



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to