public static function hasPcreUnicodeSupport()
    {
        if (self::$hasPcreUnicodeSupport === null) {
            self::$hasPcreUnicodeSupport =
                defined('PREG_BAD_UTF8_OFFSET_ERROR') &&
                @preg_match('/\pL/u', 'a') == 1;
        }
        return self::$hasPcreUnicodeSupport;
    }