You are here: Re: Replace character (UTF-8) « PHP Programming Language « IT news, forums, messages
Re: Replace character (UTF-8)

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация