PHP - Multibyte Safe Regular Expression Support

PHP supports regular expressions in three ways :

There is Unicode on the Internet today , and PHP has also since 5.6 because of i18n . While PHP itself is known to be terribly poor at Unicode support, Intl provides access to the released ICU library .

To avoid long wait for UString and repetition (and memory) when doin 'it right , I prefer Intl and don't leave iconv , Multibyte String along with DateTime and rewrite most of the SBCS string functions to be multibyte. Some problems arise in this process:

To use PCRE with Unicode syntax , PHP buit-in PCRE , for compilation and configuration with Unicode support. On some systems it is not configured with Unicode by adding (*UTF8)

before the expression overrides the configuration.

  • Am I missing a way to work with ICU regex functions from PHP?
  • Are there any other errors to consider for Unicode PCRE?
  • Am I missing the reason why should I use Multibyte String?
+3


source to share





All Articles