Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

injection of 'today' value breaks xml parsing when the month contains accented characters #17

Open
wdrai opened this issue Aug 7, 2012 · 2 comments

Comments

@wdrai
Copy link

wdrai commented Aug 7, 2012

On a french Windows 7 (I know, this is already an issue in itself ;-)), it's impossible to build a docbook when the month contains an accented character. The Java platform encoding on Windows is always CP1252 and the date generated for the 'today' injection breaks the XML parsing with :
Error on line 4 column 19 of file:/C:/Dev/workspaceseam3/graniteds/docs/reference/src/main/docbook/en-US/master-flex.xml:
Error reported by XML parser: Invalid byte 1 of 1-byte UTF-8 sequence.

A simple workaround is to change the injectionDateFormat to a purely numeric format in the maven plugin options :
<options>
<xincludeSupported>true</xincludeSupported>
<xmlTransformerType>saxon</xmlTransformerType>
<docbookVersion>1.74.0</docbookVersion>
<localeSeparator>-</localeSeparator>
<injectionDateFormat>dd/MM/yyyy</injectionDateFormat>
</options>

I'm not sure how to fix this, I've tried to reencode the injected string in UTF-8 in AbstractDocBookMojo.getValueInjections but that did not work.

It's probably the same bug as here :
https://issues.jboss.org/browse/JBSEAM-4901
and here :
http://seamframework.org/145736.lace

@stliu
Copy link
Contributor

stliu commented Aug 8, 2012

you can set applyStandardInjectionValues to false to workaround this issue

@wdrai
Copy link
Author

wdrai commented Aug 9, 2012

I know. Setting a numeric injectionDateFormat also works fine.

gunnarmorling referenced this issue in gunnarmorling/hibernate-ogm Aug 26, 2013
rhusar pushed a commit to rhusar/hornetq that referenced this issue Dec 9, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants