{"action":"created","issue":{"url":"https://api.github.com/repos/digital-preservation/droid/issues/116","repository_url":"https://api.github.com/repos/digital-preservation/droid","labels_url":"https://api.github.com/repos/digital-preservation/droid/issues/116/labels{/name}","comments_url":"https://api.github.com/repos/digital-preservation/droid/issues/116/comments","events_url":"https://api.github.com/repos/digital-preservation/droid/issues/116/events","html_url":"https://github.com/digital-preservation/droid/issues/116","id":182767807,"number":116,"title":"Wrong encoding in XML reports (Windows)","user":{"login":"marhop","id":5216507,"avatar_url":"https://avatars.githubusercontent.com/u/5216507?v=3","gravatar_id":"","url":"https://api.github.com/users/marhop","html_url":"https://github.com/marhop","followers_url":"https://api.github.com/users/marhop/followers","following_url":"https://api.github.com/users/marhop/following{/other_user}","gists_url":"https://api.github.com/users/marhop/gists{/gist_id}","starred_url":"https://api.github.com/users/marhop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marhop/subscriptions","organizations_url":"https://api.github.com/users/marhop/orgs","repos_url":"https://api.github.com/users/marhop/repos","events_url":"https://api.github.com/users/marhop/events{/privacy}","received_events_url":"https://api.github.com/users/marhop/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-10-13T11:47:33Z","updated_at":"2016-11-23T19:02:18Z","closed_at":null,"body":"The XML files DROID writes when creating a report claim to be UTF-8 encoded, having `encoding=\"UTF-8\"` in the XML header. However, when reporting on a profile with a name that contains characters outside the ASCII range, the profile name (e.g., in the report file's element `/Report/Profiles/Profile/Name`) is _not_ encoded as UTF-8. It rather looks like ISO 8859-1 (Latin-1) encoding. As a weird side effect, the DROID GUI will not open the report window in this case.\n\nThis happens only on Windows! On Linux, the whole report XML file (including the funny profile name) is encoded correctly as UTF-8.\n\nTo reproduce:\n1. Start DROID (GUI), add some files and save the profile using a file name that contains characters outside the ASCII range, like german umlauts ä, ö, ü.\n2. Run an analysis. Everything should work fine.\n3. Create a report (any template). A report XML file is created in the `C:\\Users\\Me\\.droid6\\tmp` directory, but the usual report windows does _not_ open. (DROID continues to work normally afterwards.) Looking at the report XML file you will find the wrong encoding.\n\nExample: Say the profile name contains the character `ü`. In the report XML file, it will be encoded as `FC` (hex) instead of the correct UTF-8 byte stream `C3BC` (hex).\n\nTested configuration: Windows 7 (german), Java 8u101, DROID 6.2.1\n"},"comment":{"url":"https://api.github.com/repos/digital-preservation/droid/issues/comments/262603306","html_url":"https://github.com/digital-preservation/droid/issues/116#issuecomment-262603306","issue_url":"https://api.github.com/repos/digital-preservation/droid/issues/116","id":262603306,"user":{"login":"snail1966","id":4448475,"avatar_url":"https://avatars.githubusercontent.com/u/4448475?v=3","gravatar_id":"","url":"https://api.github.com/users/snail1966","html_url":"https://github.com/snail1966","followers_url":"https://api.github.com/users/snail1966/followers","following_url":"https://api.github.com/users/snail1966/following{/other_user}","gists_url":"https://api.github.com/users/snail1966/gists{/gist_id}","starred_url":"https://api.github.com/users/snail1966/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snail1966/subscriptions","organizations_url":"https://api.github.com/users/snail1966/orgs","repos_url":"https://api.github.com/users/snail1966/repos","events_url":"https://api.github.com/users/snail1966/events{/privacy}","received_events_url":"https://api.github.com/users/snail1966/received_events","type":"User","site_admin":false},"created_at":"2016-11-23T19:02:18Z","updated_at":"2016-11-23T19:02:18Z","body":"This issue now appears to be fixed in development.   I also found that there were related issues affecting export of reports from the DROID GUI, and the generation of reports using the command line.  These issues should all now be fixed in the codebase (at my fork at https://github.com/snail1966/droid/tree/report-Xml-Utf-8).  The necessary changes were more wide ranging than initially envisaged, and further testing will be required across various platforms - it is thus not clear just now whether this will be included in the next release expected before Christmas.  \r\n\r\nN.B. once this code is deployed to a release, it may also be necessary for existing users to update manually the Web page.html.xsl file under report definitions (or edit the file to include the <meta charset=\"utf-8\"/> in the HTML head) - this is required to ensure the Web page export renders correctly.\r\n\r\nHowever, the following workaround may help in the meantime:- Instead of opening droid.bat, run DROID directly from the command line using java or javaw, and specify the UTF-8 encoding via a flag.  E.g. the following works for me in Powershell (the single quotes are required in Powershell but not cmd):\r\n>java '-Dfile.encoding=UTF-8' -jar .\\droid-ui-6.2.1.jar \r\n\r\nHopefully this is of some help pending the code update. Thanks again marhop for raising this issue, and Adam for your input.\r\nRegards, Brian\r\n\r\n"}}
{"actor":{"display_login":"snail1966"}}