[Mapbender-dev] json_encode, ISO-8859-1, Ticket 171

Christoph Baudson christoph.baudson at wheregroup.com
Tue Sep 15 10:15:08 EDT 2009


Thomas Baschetti schrieb:
> Hi,
>
> while exploring http://trac.osgeo.org/mapbender/ticket/171
> i got a little bit stuck.
> The problem seems to in
>
> mod_addWMSfromfilteredList_server.php
>
> the line
>
> $output = $json->encode($resultObj);
>
> which fails if the database is not UTF-8 but ISO-8859-1
> see http://de.php.net/manual/en/function.json-encode.php
> "This function only works with UTF-8 encoded data." If you use e.g. 
> german umlauts in ISO you will get "Oberfl" instead of "Oberfläche".
> So, converting values to UTF-8 is necessary, but when and where?
> Right after retrieving the values from the database or just before
> using json_encode? And are other files affected, too?

Hi Thomas,

please check the method "encode" of http/classes/class_json.php

We could make the change there...

Hope this helps

Christoph


>
> Any hints?
>
> Ciao
> Thomas


-- 
********************************************
INTERGEO 2009
22.-24. September 2009 in Karlsruhe
Halle 1, Stand 1.417
www.intergeo.de
******************************************** 

_______________________________________

W h e r e G r o u p GmbH & Co. KG

Siemensstraße 8
53121 Bonn
Germany

Christoph Baudson
Anwendungsentwickler

Fon: +49 (0)228 / 90 90 38 - 15
Fax: +49 (0)228 / 90 90 38 - 11
christoph.baudson at wheregroup.com
www.wheregroup.com
Amtsgericht Bonn, HRA 6788
_______________________________________

Komplementärin:
WhereGroup Verwaltungs GmbH
vertreten durch:
Olaf Knopp, Peter Stamm
_______________________________________ 



More information about the Mapbender_dev mailing list