mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-22 06:07:57 +01:00
Fix encoding on returning maps.
This commit is contained in:
parent
edc3351fd8
commit
d52e2c04a6
@ -175,10 +175,11 @@ public class MindmapController extends BaseController {
|
||||
|
||||
@RequestMapping(method = RequestMethod.GET, value = "/maps/{id}/document/xml",consumes = {"text/plain"}, produces = {"application/xml"})
|
||||
@ResponseBody
|
||||
public String retrieveDocument(@PathVariable int id, @NotNull HttpServletResponse response) throws WiseMappingException, IOException {
|
||||
public byte[] retrieveDocument(@PathVariable int id, @NotNull HttpServletResponse response) throws WiseMappingException, IOException {
|
||||
// I should not return byte, but there is some encoding issue here. Further research needed.
|
||||
response.setCharacterEncoding("UTF-8");
|
||||
final Mindmap mindmap = mindmapService.findMindmapById(id);
|
||||
return mindmap.getXmlStr();
|
||||
return mindmap.getXmlStr().getBytes("UTF-8");
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user