- catalog a record that includes umlauts äöü
- write a report, that has the record in the result set
- access the JSON output of the report
<OPAC BaseURL/cgi-bin/koha/svc/report?id=1
- verify the umlaut displays not correctly
- switch the encoding in the browser to 'western'/latin1
- verify the umlaut now displays correctly
- apply patch
- verify umlaut now displays correctly from the beginning
Based on paste from Galen Charlton.
Followed test plan. Result as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
use Modern::Perl;
use C4::Reports::Guided;
-use JSON;
+use JSON::XS;
use CGI;
use Koha::Cache;
else {
$lines = $sth->fetchall_arrayref;
}
- $json_text = to_json($lines);
+ $json_text = encode_json($lines);
if ($cache_active) {
$cache->set_in_cache( $cache_key, $json_text,
}
}
else {
- $json_text = to_json($errors);
+ $json_text = encode_json($errors);
}
}