PHP string functions vs mbstring functions

前端 未结 3 1899
余生分开走
余生分开走 2021-01-22 04:51

I have an application that has so far been in English only. Content encoding throughout templates and database has been UTF-8. I am now looking to internationalize/translate the

3条回答
  •  太阳男子
    2021-01-22 05:34

    The number of multibyte functions really needed are under 10, so create 3 or 5 questions whether the usage of the function or logic is good. This quesiton is obsecure and hard to answer. Small questions can get quick answers. Concrete questions can bring out good answers. let me know when you create other questions.

    If you need use cases, see the fallback functions in CMSes such as Wordpress, MediaWiki, Drupal.

    When you decide to start using mbstring, You should avoid using mbstring.func_overload directive. Mbstring maintainers are going to deprecate mbstring.func_overload in PHP 5.5 or 5.6 (see PHP core mailing list in 2012 April). mbstring.func_overload breaks the codebases that are not expected to use mbstring.func_overload. you can see the cases in CakePHP, Zend Framework 1x in caliculating Content-Length by using strlen().

    I answerd the similar question in another place: Should i refactor all my framework to use mbstring functions?

提交回复
热议问题