NYCPHP Meetup

NYPHP.org

[nycphp-talk] PHP UTF8 Conversion to ASCII

Rob Marscher rmarscher at beaffinitive.com
Thu Nov 10 18:53:17 EST 2011


> On Thu, Nov 10, 2011 at 4:11 PM, Peter Sawczynec <ps at blu-studio.com> wrote:
> 
> 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
> 
If these links are being auto-generated from your content titles, it is sometimes referred to as a "slug" - http://en.m.wikipedia.org/wiki/Slug_(web_publishing)

You'll find code in wordpress and other open source apps for handling the transliteration of slugs that can do it without iconv, but that is a pretty good route if you have it available.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20111110/6a9e5665/attachment.html>


More information about the talk mailing list