Hacker News new | past | comments | ask | show | jobs | submit
The php convention is that strings are bytes, but we store utf8 in them. Convert or validate at ingestion, transform using the mb_* family of functions, and be happy.
I have heard this exact answer for decades. The mb_slop_uppercase() is not, and should not be acceptable for any modern language.
It's a big world out there, it's not like you don't have a choice. I quite like the model.

Perl was famous for excellent native unicode support in its native string type, but the result was that you had to keep track of whether your variable was native unicode or octets, and many CPAN modules would try to transparently support both, in buggy ways. A richer system is not always an advantage.

I mean look at python, they did the correct decision and made strings unicode. Today python is more popular then ever. Even go (much more low level) have unicode strings, even if you can in theory have garbage data.

PHP just sits and clones useless ad-hoc features year after year. Its like the pinnacle of yolo development.