unicode - Why is mb_convert_case in PHP 5.4 breaking my string, when in 5.2 it doesn't?
Get the solution ↓↓↓Solution:
Either pass in$encoding
to every call tomb_
functions, or set:
mb_internal_encoding("UTF-8");
to make sure PHP knows what encoding you're working with. Otherwise the encoding comes fromphp.ini
, or a default ISO-8859-1 if not included there either.
So your 5.4 installation is defaulting to ISO-8859-1 and so lowercasing the lead byte of the UTF-8 sequence, breaking it. The same happens for me in 5.2, so maybe there's something else about your 5.2 installation that's different - maybeinternal_encoding
in theini
being set to something else without letters in those byte positions?
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: the payload is invalid.
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.