|
Posted by Michal Stankoviansky on 11/18/84 11:54
Although is an mb_string extension for working with multibyte strings,
but in this case (replacing one string with another string) you can use
str_replace, no matter what the character set is. But, as someone above
pointed out, the PHP script must be correctly saved in UTF-8.
Recommended reading:
http://www.phpwact.org/php/i18n/charsets
kAlvaro wrote:
> There're some replace functions for multibyte strings:
>
> mb_ereg_replace - Replace regular expression with multibyte support
> mb_eregi_replace - Replace regular expression with multibyte support
> ignoring case
There is also an "u" (PCRE_UTF8) modifier for more powerful preg_*
functions, but in this case, str_replace is sufficient.
Michal Stankoviansky
Navigation:
[Reply to this message]
|