Any PHP version from 5.0 onwards should be fine with...
$decoded = html_entity_decode('Växjö', ENT_COMPAT, 'UTF-8');
Demo here - http://3v4l.org/DZc59
Вопрос
how do i convert below text to something like "Växjö" using PHP?
Växjö
I have tried
html_entity_decode(preg_replace("/U\+([0-9A-F]{4})/", "&#x\\1;", $text), ENT_NOQUOTES, 'UTF-8')
iconv(mb_detect_encoding($text, mb_detect_order(), true), "UTF-8", $text)
Решение
Any PHP version from 5.0 onwards should be fine with...
$decoded = html_entity_decode('Växjö', ENT_COMPAT, 'UTF-8');
Demo here - http://3v4l.org/DZc59
Другие советы
echo html_entity_decode('Växjö', ENT_QUOTES, 'UTF-8');