You are here: Re: locale fr_FR.utf8 and str_word_count() « PHP Programming Language « IT news, forums, messages
Re: locale fr_FR.utf8 and str_word_count()

Posted by Peter Münster on 08/30/06 12:08

On Wed, 30 Aug 2006, Kimmo Laine wrote:

> That might be a multibyte-string related problem. If the string is encoded
> using multibyte charset, such as utf-8, it could be the reason
> str_word_count is confused.

Yes, you're right: I've just tried with fr_FR.iso885915 and it works.

> Once you've installed multibyte library, you could try writing a regular
> expression for counting the words and use it with the mb_ereg* functions.

Thanks for the hint. As a workaround I use already a regular expression to
get the words, but str_word_count() is still better than my solution:
str_word_count() detects constructs like "it's" and "week-end" etc.

Is multi-byte support planned for str_word_count() ?

Cheers, Peter

--
email: pmrb at free.fr
http://pmrb.free.fr/contact/

 

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

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