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

Posted by kAlvaro on 12/17/00 11:54

Peter.Laganis@gmail.com wrote:
> I would like to replace all the special characters ' ¾' with another
> special character 'ž' in a string (retreived by an SQL). After that I
> would like to update the field with the corrected string.

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

In any case, I believe PHP doesn't really need to know whether it's a
two byte char or two single byte chars*. So maybe you specify the terms
as strings and you haven't saved your file as UTF-8 you the char in the
file is not the one you think you typed :-?

(*) This doesn't mean it'll work in _all_ cases

 

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

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