PCRE not compiled with utf-8 support - error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • zenfort
    Member
    • Mar 2004
    • 42

    PCRE not compiled with utf-8 support - error

    cpanel73
    I am trying to install Easy 2 Gallery 1.4.0 in modxcms 1.0.4 = I get the error:

    Fatal error: PCRE is not compiled with UTF-8 support in /home/xxxxx/xxxxx/assets/modules/easy2/includes/utf8/utf8.php on line 49

    Any knowledge of this problem?
    Thanks
  • djn
    Senior Member
    • Mar 2004
    • 140

    #2
    Well, I just tried to run a preg_match('/\pL/u', 'a') on cPanel59 and it worked just fine, so UTF-8 support should be there - on that server at least.

    Comment

    • zenfort
      Member
      • Mar 2004
      • 42

      #3
      work around

      Still a problem on install - but
      Andrew had me comment out the check.
      The install completes fine with the check commented out.

      Code:
      /**
      * Check whether PCRE has been compiled with UTF-8 support
      */
      /**$UTF8_ar = array();
      if ( preg_match('/^.{1}$/u',"ñ",$UTF8_ar) != 1 ) {
          trigger_error('PCRE is not compiled with UTF-8 support',E_USER_ERROR);
      }
      unset($UTF8_ar);
      */
      namaste

      Comment

      • djn
        Senior Member
        • Mar 2004
        • 140

        #4
        Well, it's the test that gets it wrong - that /^.{1}$/u regex pattern checks for the test string to contain exactly one character, while the supplied string contains two of them, and ±. Guess somebody copy-pasted that stuff into the code without checking...

        Comment

        Working...