mapfish / mapfish-print

A component of MapFish for printing templated cartographic maps. This module is the Java serverside module.
http://mapfish.github.io/mapfish-print-doc/
BSD 2-Clause "Simplified" License
184 stars 417 forks source link

Get Capabilities `pretty=true` flag encoding issue #3266

Closed ltshb closed 1 month ago

ltshb commented 5 months ago

Context

MapFish print docker image version: camptocamp/mapfish_print:3195

Describe the bug

When requesting the capabilities with the pretty=true query parameter, the json answer is not correctly encoded in utf-8 as specified in the Content-Type header but in some other encoding. This can be reproduced if the capabilities have a special character, like for example having an attribute copyright with a ©

templates:
#===========================================================================
  "1. A4 landscape": !template
#===========================================================================
    pdfConfig: !pdfConfig &pdfConfig
      title: "A4 Landscape"
      keywords: ["map.geoadmin.ch"]
    reportTemplate: A4_landscape_template.jrxml
    attributes:
      url: !string {}
      copyright: !string &copyright
          default: '© swisstopo'

Without the pretty flag it works fine