(鉑) string functions and UTF8 in php

Solution:1

Make sure you set the proper internal encoding:

<?php
echo mb_internal_encoding() . '<br />';

echo mb_strlen('鉑', 'utf-8') . '<br />';
echo mb_strlen('鉑') . '<br />';

mb_internal_encoding('utf-8');
echo mb_internal_encoding() . '<br />';
echo mb_strlen('鉑') . '<br />';

// ISO-8859-1
// 1
// 3
// UTF-8
// 1