logoalt Hacker News

phplovesong • today at 11:02 AM • 2 replies • view on HN

Still no builtin unicode support? What the hell is this? A web language that does not default to unicode, thats pretty weak for a language in 2026


Replies

downsplat • today at 1:34 PM

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.

vrubleg • today at 12:08 PM

The idea of UTF-16 strings in PHP 6 were a mistake. UTF-8 works in PHP just fine. New languages (e.g. Rust, Go, Swift) stick to UTF-8. UTF-16 is legacy that would be nice to get rid of where it's used (Java, C#, JS, WinAPI), but that is impossible because of backwards compatibility.