On 3/23/09 2:02 PM, "Tom Worster" <f...@thefsb.org> wrote:

> i havea general replacement or workaround for every php function in my code
> that i know to be utf-8-unsafe. except one: strtr().

strtr() with three parameters is certainly unsafe. but my tests are showing
that it may be ok with two parameters if the strings in the second parameter
are well formed utf-8.

does anyone know more? can confirm or contradict?

> the only ideas i have to implement strtr in php with known utf-8-safe php
> functions would be rather inefficient.

my replacement for the 3-param strtr is an order of magnitude less unlovely
to behold than my replacement for the 2-param version

> any ideas, suggestions, pointers? or maybe you're better at googling an
> answer than i am. assume mbstring is available.

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to