I'm trying to change the case of russian characters from upper to lower.
function toLower($string) {
echo strtr($string,'ЁЙЦУКЕНГШЩЗХЪФЫВАПРОЛДЖЭЯЧСМИТЬБЮ','ёйцукенгшщзхъфывапролджэячсмитьбю');
};
This is the function I used and the output looks something like this
ЁЙ## ёѹ##`
Can anybody help me with this ? Thanks in advance
$result = mb_strtolower($orig, 'UTF-8');
(assuming the data is in utf-8)
Specify the charset within the HTML and use mb_strtolower()
to convert case:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 TRANSITIONAL//EN">
<html>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<head>
<title></title>
</head>
<body>
<?
$string = 'ЦУКЕНГШЩЗХЪФЫВАПРОЛДЖЭЯЧСМИТЬБЮ' ;
echo mb_strtolower($string, 'UTF-8');
?>
</body>
</html>
With the meta-tag it looks like this:
цукенгшщзхъфывапролджэячсмитьбю
Without the meta-tag it looks like this
цукенгшщзхъфывапролджÑÑчÑмитьбю
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With