stanley-king %!s(int64=7) %!d(string=hai) anos
pai
achega
8ecf3f7455
Modificáronse 3 ficheiros con 15 adicións e 1 borrados
  1. 1 1
      mobile/control/control.php
  2. 1 0
      mobile/control/member_ugc.php
  3. 13 0
      test/TestUGC.php

+ 1 - 1
mobile/control/control.php

@@ -289,7 +289,7 @@ class mbMemberControl extends mobileControl
 
 function bonus_version()
 {
-    return "v=2017082901";
+    return "v=2017083001";
 }
 function shop_version()
 {

+ 1 - 0
mobile/control/member_ugc.php

@@ -418,6 +418,7 @@ class member_ugcControl extends specialControl
         if(empty($comment)) {
             return self::outerr(errcode::ErrParamter,"评论内容不能为空.");
         }
+        //$comment = iconv('utf-16', 'utf-8', $comment);
         $comment = text_filter::filter_html($comment);
         if(empty($comment)) {
             return self::outerr(errcode::ErrParamter,"评论内容不能含非法字符.");

+ 13 - 0
test/TestUGC.php

@@ -138,6 +138,19 @@ class TestUGC extends PHPUnit_Framework_TestCase
         }
         return $result;
     }
+    public function testEmojj()
+    {
+        $mod_comment = Model('ugc_comment');
+        $item = $mod_comment->getCommentByID(552);
+    }
+    public function testU16()
+    {
+        $str = "托尔斯泰🇺🇸🌹😃😄";
+        $s = iconv('UTF-16', 'UTF-8', $str);
+        $y = iconv_get_encoding();
+        $len = iconv_strlen($str,'UTF-8');
+
+    }
 }