Answer the question
In order to leave comments, you need to log in
I don't understand what is the encoding problem?
Hi all. Help, please, to understand in what a problem. I write in PHP. There is a line and in it you need to raise the first character to upper case. Just some kind of anomaly.
echo mb_convert_case("полимерная компьютерная линза", MB_CASE_TITLE, "UTF-8");
полимерная Компьютерная Линза
echo mb_substr($string, 0, 1, "utf-8");
Answer the question
In order to leave comments, you need to log in
There may be some non-printable character at the beginning. Do first trim();
mb_internal_encoding("UTF-8");
function mb_ucfirst($text) {
return mb_strtoupper(mb_substr($text, 0, 1)) . mb_substr($text, 1);
}
echo mb_ucfirst("тест\n");
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question