Edit report at https://bugs.php.net/bug.php?id=67986&edit=1

 ID:                 67986
 Updated by:         [email protected]
 Reported by:        pz9042 at 163 dot com
 Summary:            preg函数处理utf8中文
-Status:             Open
+Status:             Feedback
 Type:               Bug
 Package:            PECL
 Operating System:   win
 PHP Version:        5.4.32
 Block user comment: N
 Private report:     N

 New Comment:

Sorry, only half of the world speaks Chinese these days, the other half mostly 
uses English.
Try reporting the same in English, pls.


Previous Comments:
------------------------------------------------------------------------
[2014-09-09 06:38:21] pz9042 at 163 dot com

Description:
------------
在一用preg_match或者preg_match_all 或者preg_replace处理一段utf8编ç 
çš„中文时,谷歌浏览器报与localhost的连接中断,火狐则跳转到www.localhost.com页面,经排查,讲字符转成ansi编ç
 
ï¼Œå°±ä¸ä¼šå‡ºçŽ°é—®é¢˜ï¼Œä¸”åœ¨win下cli下,也不会错误,只有用浏览器会出现此问题,web服务器是apache,不管是浏览器还是cli,php的é
…ç½®æ–‡ä»¶æ˜¯åŒä¸€ä¸ª

Test script:
---------------
header("Content-type: text/html; charset=utf-8"); 
ini_set('pcre.backtrack_limit', '-1');
ini_set('pcre.recursion_limit', '-1');

$source = '<p>用户注册须å…
·æœ‰æ³•定的相应权利能力和行为能力的自然人、法人或å…
¶ä»–组织,能够独立承担法律责任。您完成注册程序或å…
¶ä»–十色网平台同意的方式实际
使用本平台服务时,即视为您确认自己具备主体资æ 
¼ï¼Œèƒ½å¤Ÿç‹¬ç«‹æ‰¿æ‹…法律责任。若因您不具备主体资æ 
¼ï¼Œè€Œå¯¼è‡´çš„一切后果,由您及您的监护人自行承担。</p>';
preg_match( 
"/([^a-zA-Z0-9_]{1,1})+(copy|fputs|fopen|file_put_contents|fwrite|eval|phpinfo)+/is"
 ,$source ,$match );
print_r($match);exit;



------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=67986&edit=1

-- 
PECL development discussion Mailing List (http://pecl.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to