I've searched but still stumped
How do I convert a string with ñ to have the ñ in uppercase too?
e.g.
"Nuñez"
to
"NUÑEZ"
mb_strtoupper
is not working due to no english.
I've searched but still stumped
How do I convert a string with ñ to have the ñ in uppercase too?
e.g.
"Nuñez"
to
"NUÑEZ"
mb_strtoupper
is not working due to no english.
You will need to play with encoding.
$content = 'Nuñez';
mb_internal_encoding('UTF-8');
if(!mb_check_encoding($content, 'UTF-8')
OR !($content === mb_convert_encoding(mb_convert_encoding($content, 'UTF-32', 'UTF-8' ), 'UTF-8', 'UTF-32'))) {
$content = mb_convert_encoding($content, 'UTF-8');
}
// NUÑEZ
echo mb_convert_case($content, MB_CASE_UPPER, "UTF-8");