[nycphp-talk] PHP UTF8 Conversion to ASCII
Peter Sawczynec
ps at blu-studio.com
Thu Nov 10 16:11:22 EST 2011
Recently came across the issue where utf8 characters were getting outputted into links like so:
http://example.com/ãcenar [<< where the "a" is a special character], which a browser can turn to links like so:
http://example.com/ã�cenar
In researching, I have found that browsers do not handle special utf8 characters in urls very well.
So I looked into PHP conversions of utf8 to ascii and found that even this seems an imperfect art.
Has anyone found a near perfect utf8 to ascii conversion technique for PHP.
I found this reference here: http://www.unexpectedit.com/php/php-clean-string-of-utf8-chars-convert-to-similar-ascii-char
Is this the best at this time? Any thoughts?
(Also see this nice character encoding overview if needed: http://htmlpurifier.org/docs/enduser-utf8.html)
Warmest regards,
Peter Sawczynec
Technology Dir.
blūstudio
941.893.0396
<mailto:ps at sun-code.com> ps at blu-studio.com
<http://www.blu-studio.com> www.blu-studio.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20111110/b5ee6403/attachment.html>
More information about the talk
mailing list