Alexander Kuzmenko 7 年之前
父节点
当前提交
294e90486b
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      std/php/Boot.hx

+ 1 - 1
std/php/Boot.hx

@@ -668,7 +668,7 @@ private class HxString {
 	}
 	}
 
 
 	public static function charAt( str:String, index:Int) : String {
 	public static function charAt( str:String, index:Int) : String {
-		return index < 0 ? '' : Global.mb_substr(str, index, 1);
+		return index < 0 ? '' : Global.mb_substr(str, index, 1, 'UTF-8');
 	}
 	}
 
 
 	public static function charCodeAt( str:String, index:Int) : Null<Int> {
 	public static function charCodeAt( str:String, index:Int) : Null<Int> {