3 ms·
Yeah, I've used iconv('UTF-8', 'ASCII//TRANSLIT', $text) in my work to make sure I could accept arbitrary Unicode from users, and also send that same info
by function_seven 6y ago
Yeah, I've used
iconv('UTF-8', 'ASCII//TRANSLIT', $text)
in my work to make sure I could accept arbitrary Unicode from users, and also send that same info as ASCII to legacy systems that mangled UTF. It worked really well.
When I wrote the parent comment, I tried it real quick with a REPL on my own machine, but apparently I don't have the right combination of environment variables or locales or God knows what. Didn't feel like chasing that rabbit into his hole.