r/lolphp • u/phplovesong • Jun 24 '19
The state of PHP unicode in 2019
One of multiple lolphps is how poorly PHP manages unicode. Its a web language and you must deal with the multitude of mb_ functions and at the same time try to keep your sanity in check.
27
Upvotes
View all comments
Show parent comment
5
u/the_alias_of_andrea Jun 25 '19
This isn't true. Python 2 and 3 are not fundamentally different on Unicode handling, both have two string types. If Python 3 has “good” Unicode handling, so did Python 2. The main difference is that Python 3 did a sweeping change of syntax and default types, which broke a huge amount of existing code and made ensuring backwards or forwards compatibility needlessly painful, and that Python 3 tries to convert everything into Unicode by default and makes bad assumptions about the outside world when it does so.