MultibyteString

From MapbenderWiki

Jump to: navigation, search

Contents

Theory

http://de2.php.net/manual/de/book.mbstring.php

Practice in Mapbender

Multi-byte string handling is essential if UTF-8 is the internal encoding of Mapbender.

The following steps need to be done

install PHP mbstring

done

internal encoding

Internally, all data is UTF-8. Set the internal encoding via mb_internal_encoding("utf-8");

Is always set in core/globalSettings.php

done

use mbstring function

Replace functions like strlen with mbstring equivalent, mb_strlen

done (full list of mb_string replacements)

HTML formatting

The function htmlspecialchars and htmlentities need to be called with third parameter

see http://de2.php.net/manual/de/function.htmlentities.php

see http://de2.php.net/manual/de/function.htmlspecialchars.php

open

Views
Personal tools