Jesse Glick commented on Bug JENKINS-24953

The Jenkins plugin passes --encoding UTF-8 since it also writes the XML header and footer and has to parse the file in a specific encoding. It could of course omit this flag and parse the XML in the system default encoding. But this would have the unfortunate effect that, say, Jenkins running on Windows server would be unable to handle non-ASCII commit messages created by developers working on Linux; and it would not prevent a malformed changelog.xml from being written. Mercurial itself punts on the whole issue and just treats all filenames and messages as opaque 8-bit content, but Jenkins has to interoperate with the wider world (your web browser especially) so it really needs to have a defined encoding. Apparently the filenames you are committing to your repository are in Cp1252 and Mercurial running with --encoding UTF-8 does not notice this for some reason.

As a workaround, it might suffice for the plugin to also pass --encodingmode replace (or perhaps ignore). If that solves your issue well enough, file a pull request to that effect. However my understanding is that the default is strict, which ought to have prevented changelog.xml from being written at all (or from being completed once started), which is not what you seem to have observed. I know of no mode in which it is allowed to write 0xE9 when --encoding UTF-8 has been specified, so this might be a Mercurial bug.

The only full and portable solution is to consistently use UTF-8 in your repository (in filenames and commit messages).

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

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to