I am trying to upload a CSV file exported from MS Project (attached) to my web application, but the content returned does not respect the correct charset encoding of the file (Cp1252, pt-BR). Our application uses UTF-8 as default, by the way.
The org.zkoss.util.media.Media class have three methods to return the content (getByteData does not work in this case): getStringData() , which returns an empty string, getStreamData(), which in this case throws an Exception, and then says to use getReaderData() instead. This last one works, but the charset encoding and the resulting file is not correct. I have tried to change the charset used in InputStream and OutputStream, while copying the file, but with no success.
For all other file types we use, the return of Media is correct, but in this case is not.
For example:
Correct text: Projeto de Implantação da Gestão
Error: Projeto de Implantaýýo da Gestýo
Favourite Filters
You must be logged in to view favourite filters.
Export - CSV (All fields)
Export - CSV (Current fields)
Search
1 of 1
-
Unassigned
-
Janio
- Votes:
-
0 Vote for this issue
- Watchers:
-
1 Start watching this issue
- Created:
- Updated:
{"searchers":{"groups":[{"searchers":[{"name":"Project","id":"project","key":"issue.field.project","isShown":true,"lastViewed":1744925700151},{"name":"Summary","id":"summary","key":"issue.field.summary","isShown":true},{"name":"Type","id":"issuetype","key":"issue.field.issuetype","isShown":true,"lastViewed":1744925700151},{"name":"Status","id":"status","key":"issue.field.status","isShown":true,"lastViewed":1744925700155},{"name":"Priority","id":"priority","key":"issue.field.priority","isShown":true},{"name":"Resolution","id":"resolution","key":"issue.field.resolution","isShown":true},{"name":"Creator","id":"creator","key":"issue.field.creator","isShown":true},{"name":"Affects Version","id":"version","key":"issue.field.affectsversions","isShown":true},{"name":"Fix Version","id":"fixfor","key":"issue.field.fixversions","isShown":true},{"name":"Component","id":"component","key":"issue.field.components","isShown":true},{"name":"% Limits","id":"workratio","key":"issue.field.workratio","isShown":true},{"name":"Link types","id":"issue_link_type","key":"issue.field.issuelinks","isShown":true},{"name":"Environment","id":"environment","key":"issue.field.environment","isShown":true},{"name":"Description","id":"description","key":"issue.field.description","isShown":true},{"name":"Comment","id":"comment","key":"issue.field.comment","isShown":true},{"name":"Label","id":"labels","key":"issue.field.labels","isShown":true,"lastViewed":1744925700156},{"name":"Query","id":"text","key":"text","isShown":true},{"name":" Freshservice Tickets","id":"customfield_10200","key":"com.atlassian.jira.plugin.system.customfieldtypes:textarea","isShown":false},{"name":"Development","id":"customfield_10800","key":"com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary","isShown":true},{"name":"Hit Rate Index","id":"customfield_10000","key":"com.atlassian.jira.plugin.system.customfieldtypes:float","isShown":false},{"name":"Original story points","id":"customfield_11103","key":"com.atlassian.jpo:jpo-custom-field-original-story-points","isShown":true},{"name":"Parent Link","id":"customfield_11100","key":"com.atlassian.jpo:jpo-custom-field-parent","isShown":false},{"name":"Release Version History","id":"customfield_10310","key":"com.pyxis.greenhopper.jira:greenhopper-releasedmultiversionhistory","isShown":true},{"name":"Safety specification requirements","id":"customfield_11300","key":"com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons","isShown":false},{"name":"Team","id":"customfield_11200","key":"com.atlassian.teams:rm-teams-custom-field-team","isShown":true},{"name":"Epic Colour","id":"customfield_10308","key":"com.pyxis.greenhopper.jira:gh-epic-color","isShown":false},{"name":"Epic Name","id":"customfield_10306","key":"com.pyxis.greenhopper.jira:gh-epic-label","isShown":true},{"name":"Epic Link","id":"customfield_10305","key":"com.pyxis.greenhopper.jira:gh-epic-link","isShown":true},{"name":"Epic Status","id":"customfield_10307","key":"com.pyxis.greenhopper.jira:gh-epic-status","isShown":false},{"name":"Business Value","id":"customfield_10303","key":"com.atlassian.jira.plugin.system.customfieldtypes:float","isShown":false},{"name":"Flagged","id":"customfield_10300","key":"com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes","isShown":true},{"name":"Epic/Theme","id":"customfield_10301","key":"com.atlassian.jira.plugin.system.customfieldtypes:labels","isShown":true},{"name":"Story Points","id":"customfield_10302","key":"com.atlassian.jira.plugin.system.customfieldtypes:float","isShown":false},{"name":"Rank","id":"customfield_10309","key":"com.pyxis.greenhopper.jira:gh-lexo-rank","isShown":true},{"name":"Sprint","id":"customfield_10304","key":"com.pyxis.greenhopper.jira:gh-sprint","isShown":true},{"name":"issueFunction","id":"customfield_10600","key":"com.onresolve.jira.groovy.groovyrunner:jqlFunctionsCustomFieldType","isShown":true}],"type":"DETAILS","title":"Details"},{"searchers":[{"name":"Created Date","id":"created","key":"issue.field.created","isShown":true},{"name":"Updated Date","id":"updated","key":"issue.field.updated","isShown":true},{"name":"Resolution Date","id":"resolutiondate","key":"issue.field.resolution.date","isShown":true},{"name":"Target end","id":"customfield_11102","key":"com.atlassian.jpo:jpo-custom-field-baseline-end","isShown":true},{"name":"Target start","id":"customfield_11101","key":"com.atlassian.jpo:jpo-custom-field-baseline-start","isShown":true}],"type":"DATES","title":"Dates"},{"searchers":[{"name":"Assignee","id":"assignee","key":"issue.field.assignee","isShown":true,"lastViewed":1744925700155},{"name":"Reporter","id":"reporter","key":"issue.field.reporter","isShown":true}],"type":"PEOPLE","title":"People"}]},"values":{"issuetype":{"name":"Type","editHtml":"\n\n\n\n <div class=\"field-group aui-field-issuetype\" >\n <label for=\"searcher-type\">Type</label> <select class=\"select js-default-checkboxmultiselect\"\n id=\"searcher-type\"\n multiple=\"multiple\"\n name=\"type\"\n data-max-inline-results-displayed=\"100\"\n data-placeholder-text=\"Find Issue Types...\">\n <optgroup>\n \n <option class=\" \"\n id=\"type_-2\"\n title=\"All Standard Issue Types\"\n value=\"-2\">All Standard Issue Types</option>\n \n <option class=\" \"\n id=\"type_-3\"\n title=\"All Sub-Task Issue Types\"\n value=\"-3\">All Sub-Task Issue Types</option>\n </optgroup>\n\n <optgroup label=\"Standard Issue Types\">\n \n <option class=\" imagebacked 10000 10800 12000 11000 11500 10701 \"\n data-icon=\"/secure/viewavatar?size=xsmall&avatarId=12403&avatarType=issuetype\"\n data-fallback-icon=\"/images/icons/issuetypes/blank.png\"\n id=\"type_1\"\n title=\"Bug\"\n value=\"1\">Bug</option>\n \n <option class=\" imagebacked 10000 10800 11500 10701 \"\n data-icon=\"/secure/viewavatar?size=xsmall&avatarId=12407&avatarType=issuetype\"\n data-fallback-icon=\"/images/icons/issuetypes/blank.png\"\n id=\"type_10002\"\n title=\"Epic\"\n value=\"10002\">Epic</option>\n \n <option class=\" imagebacked 12000 11000 11500 \"\n data-icon=\"/secure/viewavatar?size=xsmall&avatarId=13500&avatarType=issuetype\"\n data-fallback-icon=\"/images/icons/issuetypes/blank.png\"\n id=\"type_10400\"\n title=\"Improvement\"\n value=\"10400\">Improvement</option>\n \n <option class=\" imagebacked 10000 12000 11000 11500 \"\n data-icon=\"/secure/viewavatar?size=xsmall&avatarId=12411&avatarType=issuetype\"\n data-fallback-icon=\"/images/icons/issuetypes/blank.png\"\n id=\"type_2\"\n title=\"New Feature\"\n value=\"2\">New Feature</option>\n \n <option class=\" imagebacked 10000 10800 11500 10701 \"\n data-icon=\"/secure/viewavatar?size=xsmall&avatarId=12415&avatarType=issuetype\"\n data-fallback-icon=\"/images/icons/issuetypes/blank.png\"\n id=\"type_10003\"\n title=\"Story\"\n value=\"10003\">Story</option>\n \n <option class=\" imagebacked 10800 11000 11500 10701 \"\n data-icon=\"/secure/viewavatar?size=xsmall&avatarId=13002&avatarType=issuetype\"\n data-fallback-icon=\"/images/icons/issuetypes/blank.png\"\n id=\"type_10300\"\n title=\"Task\"\n value=\"10300\">Task</option>\n </optgroup>\n\n <optgroup label=\"Sub-Task Issue Types\">\n \n <option class=\" imagebacked 10000 12000 11500 \"\n data-icon=\"/secure/viewavatar?size=xsmall&avatarId=12416&avatarType=issuetype\"\n data-fallback-icon=\"/images/icons/issuetypes/blank.png\"\n id=\"type_10200\"\n title=\"Documentation\"\n value=\"10200\">Documentation</option>\n \n <option class=\" imagebacked 10000 11500 \"\n data-icon=\"/secure/viewavatar?size=xsmall&avatarId=12416&avatarType=issuetype\"\n data-fallback-icon=\"/images/icons/issuetypes/blank.png\"\n id=\"type_10001\"\n title=\"Research\"\n value=\"10001\">Research</option>\n \n <option class=\" imagebacked 10800 11000 11500 10701 \"\n data-icon=\"/secure/viewavatar?size=xsmall&avatarId=13003&avatarType=issuetype\"\n data-fallback-icon=\"/images/icons/issuetypes/blank.png\"\n id=\"type_10301\"\n title=\"Sub-task\"\n value=\"10301\">Sub-task</option>\n \n <option class=\" imagebacked 10000 12000 11500 \"\n data-icon=\"/secure/viewavatar?size=xsmall&avatarId=12407&avatarType=issuetype\"\n data-fallback-icon=\"/images/icons/issuetypes/blank.png\"\n id=\"type_10100\"\n title=\"Testing\"\n value=\"10100\">Testing</option>\n \n <option class=\" imagebacked 10000 11500 \"\n data-icon=\"/secure/viewavatar?size=xsmall&avatarId=12418&avatarType=issuetype\"\n data-fallback-icon=\"/images/icons/issuetypes/blank.png\"\n id=\"type_10000\"\n title=\"Verify\"\n value=\"10000\">Verify</option>\n </optgroup>\n </select>\n </div>\n ","validSearcher":true,"isShown":true},"project":{"name":"Project","editHtml":" \n <div class=\"field-group aui-field-project\" >\n <label for=\"searcher-pid\">Project</label> <select class=\"js-project-checkboxmultiselect\"\n data-placeholder-text=\"Find Projects...\"\n id=\"searcher-pid\"\n multiple=\"multiple\"\n name=\"pid\">\n <optgroup label=\"All Projects\" >\n \n <option data-icon=\"/secure/projectavatar?pid=10600&size=small\"\n title=\"Freshdesk Jira Test Project\"\n value=\"10600\">\n Freshdesk Jira Test Project (FD)\n </option>\n <option data-icon=\"/secure/projectavatar?pid=11100&size=small\"\n title=\"Keikai\"\n value=\"11100\">\n Keikai (KEIKAI)\n </option>\n <option data-icon=\"/secure/projectavatar?pid=11200&size=small\"\n title=\"Keikai Doc\"\n value=\"11200\">\n Keikai Doc (KKDOC)\n </option>\n <option data-icon=\"/secure/projectavatar?pid=10800&size=small\"\n title=\"Project Q\"\n value=\"10800\">\n Project Q (PQ)\n </option>\n <option data-icon=\"/secure/projectavatar?pid=10400&size=small\"\n title=\"ZATS\"\n value=\"10400\">\n ZATS (ZATS)\n </option>\n <option data-icon=\"/secure/projectavatar?pid=10000&size=small\"\n title=\"ZK\"\n value=\"10000\">\n ZK (ZK)\n </option>\n <option data-icon=\"/secure/projectavatar?pid=10900&size=small\"\n title=\"ZK Addon\"\n value=\"10900\">\n ZK Addon (ZKADDON)\n </option>\n <option data-icon=\"/secure/projectavatar?pid=10201&size=small\"\n title=\"ZK Calendar\"\n value=\"10201\">\n ZK Calendar (ZKCAL)\n </option>\n <option data-icon=\"/secure/projectavatar?pid=10500&size=small\"\n title=\"ZK Charts\"\n value=\"10500\">\n ZK Charts (ZKCHARTS)\n </option>\n <option data-icon=\"/secure/projectavatar?pid=10700&size=small\"\n title=\"ZK CKeditor\"\n value=\"10700\">\n ZK CKeditor (ZKCK)\n </option>\n <option data-icon=\"/secure/projectavatar?pid=10300&size=small\"\n title=\"ZK Document\"\n value=\"10300\">\n ZK Document (ZKDOC)\n </option>\n <option data-icon=\"/secure/projectavatar?pid=11000&size=small\"\n title=\"ZK Fiddle\"\n value=\"11000\">\n ZK Fiddle (ZKFIDDLE)\n </option>\n <option data-icon=\"/secure/projectavatar?pid=10701&size=small\"\n title=\"ZK Gmaps\"\n value=\"10701\">\n ZK Gmaps (ZKGMAPS)\n </option>\n <option data-icon=\"/secure/projectavatar?pid=10103&size=small\"\n title=\"ZK JSP\"\n value=\"10103\">\n ZK JSP (ZKJSP)\n </option>\n <option data-icon=\"/secure/projectavatar?pid=10203&size=small\"\n title=\"ZK Pivottable\"\n value=\"10203\">\n ZK Pivottable (ZKPVT)\n </option>\n <option data-icon=\"/secure/projectavatar?pid=10101&size=small\"\n title=\"ZK Spreadsheet\"\n value=\"10101\">\n ZK Spreadsheet (ZSS)\n </option>\n <option data-icon=\"/secure/projectavatar?pid=10202&size=small\"\n title=\"ZK Spring\"\n value=\"10202\">\n ZK Spring (ZKSPRING)\n </option>\n <option data-icon=\"/secure/projectavatar?pid=10200&size=small\"\n title=\"ZK Studio\"\n value=\"10200\">\n ZK Studio (ZKSTUDIO)\n </option>\n <option data-icon=\"/secure/projectavatar?pid=10100&size=small\"\n title=\"ZTL\"\n value=\"10100\">\n ZTL (ZTL)\n </option>\n </optgroup>\n </select>\n </div>\n \n\n","validSearcher":true,"isShown":true},"assignee":{"name":"Assignee","editHtml":"\n \n <div class=\"field-group aui-field-userlist\" >\n <label for=\"searcher-assigneeSelect\">Assignee</label> <fieldset rel=\"assignee\" class=\"hidden user-group-searcher-params\">\n </fieldset>\n <select class=\"js-usergroup-checkboxmultiselect\" multiple=\"multiple\" id=\"assignee\" name=\"assignee\" data-placeholder-text=\"Enter username or group\">\n <optgroup>\n <option class=\"headerOption\" data-icon=\"https://tracker.zkoss.org/secure/useravatar?size=xsmall&avatarId=10123\" value=\"empty\" title=\"Unassigned\">Unassigned</option>\n </optgroup>\n <optgroup>\n </optgroup>\n </select>\n <input type=\"hidden\" name=\"check_prev_assignee\" value=\"true\">\n </div>\n \n","validSearcher":true,"isShown":true},"status":{"name":"Status","editHtml":"\n <div class=\"field-group aui-field-constants\" >\n <label for=\"searcher-status\">Status</label> <select class=\"select js-default-checkboxmultiselectstatuslozenge\"\n data-placeholder-text=\"Find Statuses...\"\n id=\"searcher-status\"\n multiple=\"multiple\"\n name=\"status\"\n data-max-inline-results-displayed=\"100\"\n data-footer-text=\"-90 more options. Continue typing to refine further.\" data-status-lozenge=\"true\">\n <optgroup >\n <option class=\"imagebacked\" data-icon=\"/images/icons/statuses/open.png\" value=\"1\" title=\"Open\" data-simple-status=\"{"id":"1","name":"Open","description":"The issue is open and ready for the assignee to start work on it.","iconUrl":"/images/icons/statuses/open.png","statusCategory":{"id":2,"key":"new","colorName":"default"}}\">Open</option>\n <option class=\"imagebacked\" data-icon=\"/images/icons/statuses/inprogress.png\" value=\"3\" title=\"In Progress\" data-simple-status=\"{"id":"3","name":"In Progress","description":"This issue is being actively worked on at the moment by the assignee.","iconUrl":"/images/icons/statuses/inprogress.png","statusCategory":{"id":4,"key":"indeterminate","colorName":"inprogress"}}\">In Progress</option>\n <option class=\"imagebacked\" data-icon=\"/images/icons/statuses/reopened.png\" value=\"4\" title=\"Reopened\" data-simple-status=\"{"id":"4","name":"Reopened","description":"This issue was once resolved, but the resolution was deemed incorrect. From here issues are either marked assigned or resolved.","iconUrl":"/images/icons/statuses/reopened.png","statusCategory":{"id":2,"key":"new","colorName":"default"}}\">Reopened</option>\n <option class=\"imagebacked\" data-icon=\"/images/icons/statuses/resolved.png\" value=\"5\" title=\"Resolved\" data-simple-status=\"{"id":"5","name":"Resolved","description":"A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.","iconUrl":"/images/icons/statuses/resolved.png","statusCategory":{"id":3,"key":"done","colorName":"success"}}\">Resolved</option>\n <option class=\"imagebacked\" data-icon=\"/images/icons/statuses/closed.png\" value=\"6\" title=\"Closed\" data-simple-status=\"{"id":"6","name":"Closed","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"/images/icons/statuses/closed.png","statusCategory":{"id":3,"key":"done","colorName":"success"}}\">Closed</option>\n <option class=\"imagebacked\" data-icon=\"/images/icons/statuses/resolved.png\" value=\"10000\" title=\"In Testing\" data-simple-status=\"{"id":"10000","name":"In Testing","description":"A resolution has been taken, and it is awaiting verification by tester. From here issues are either reopened, or are closed. ","iconUrl":"/images/icons/statuses/resolved.png","statusCategory":{"id":4,"key":"indeterminate","colorName":"inprogress"}}\">In Testing</option>\n <option class=\"imagebacked\" data-icon=\"/\" value=\"10001\" title=\"To Do\" data-simple-status=\"{"id":"10001","name":"To Do","description":"","iconUrl":"/","statusCategory":{"id":2,"key":"new","colorName":"default"}}\">To Do</option>\n <option class=\"imagebacked\" data-icon=\"/\" value=\"10002\" title=\"Done\" data-simple-status=\"{"id":"10002","name":"Done","description":"","iconUrl":"/","statusCategory":{"id":3,"key":"done","colorName":"success"}}\">Done</option>\n <option class=\"imagebacked\" data-icon=\"/images/icons/statuses/generic.png\" value=\"10101\" title=\"Reviewing\" data-simple-status=\"{"id":"10101","name":"Reviewing","description":"Pull requested, code review pending","iconUrl":"/images/icons/statuses/generic.png","statusCategory":{"id":4,"key":"indeterminate","colorName":"inprogress"}}\">Reviewing</option>\n <option class=\"imagebacked\" data-icon=\"/images/icons/statuses/information.png\" value=\"10201\" title=\"In Review\" data-simple-status=\"{"id":"10201","name":"In Review","description":"","iconUrl":"/images/icons/statuses/information.png","statusCategory":{"id":1,"key":"undefined","colorName":"default"}}\">In Review</option>\n </optgroup>\n</select>\n </div>\n \n","validSearcher":true,"isShown":true},"labels":{"name":"Label","viewHtml":" <div class=\"searcherValue\">\n \n <label class=\"fieldLabel\" for=\"fieldlabels\">Label:</label><span id=\"fieldlabels\" class=\"fieldValue\">\n \n charset\n</span></div>\n","editHtml":"\n <div class=\"field-group aui-field-labels\" >\n <label for=\"searcher-labels\">Labels</label> <select class=\"js-label-checkboxmultiselect\" multiple=\"multiple\" id=\"searcher-labels\" name=\"labels\" data-placeholder-text=\"Find Labels...\">\n <option value=\"charset\" title=\"charset\" selected=\"selected\">charset</option>\n </select>\n </div>\n \n","jql":"labels = charset","validSearcher":true,"isShown":true}}}
[{"id":-1,"name":"My open issues","jql":"assignee = currentUser() AND resolution = Unresolved order by updated DESC","isSystem":true,"sharePermissions":[],"requiresLogin":true},{"id":-2,"name":"Reported by me","jql":"reporter = currentUser() order by created DESC","isSystem":true,"sharePermissions":[],"requiresLogin":true},{"id":-4,"name":"All issues","jql":"order by created DESC","isSystem":true,"sharePermissions":[],"requiresLogin":false},{"id":-5,"name":"Open issues","jql":"resolution = Unresolved order by priority DESC,updated DESC","isSystem":true,"sharePermissions":[],"requiresLogin":false},{"id":-9,"name":"Done issues","jql":"statusCategory = Done order by updated DESC","isSystem":true,"sharePermissions":[],"requiresLogin":false},{"id":-3,"name":"Viewed recently","jql":"issuekey in issueHistory() order by lastViewed DESC","isSystem":true,"sharePermissions":[],"requiresLogin":false},{"id":-6,"name":"Created recently","jql":"created >= -1w order by created DESC","isSystem":true,"sharePermissions":[],"requiresLogin":false},{"id":-7,"name":"Resolved recently","jql":"resolutiondate >= -1w order by updated DESC","isSystem":true,"sharePermissions":[],"requiresLogin":false},{"id":-8,"name":"Updated recently","jql":"updated >= -1w order by updated DESC","isSystem":true,"sharePermissions":[],"requiresLogin":false}]
0.3
0
Nevermind, realized I was using a CharsetFinder which returns only UTF-8...
Now is working.