2
0
Эх сурвалжийг харах

[python] use 'replace' mode

this behavior is as same as C# and Java
Ryusei Yamaguchi 11 жил өмнө
parent
commit
e60cf902d7
1 өөрчлөгдсөн 1 нэмэгдсэн , 1 устгасан
  1. 1 1
      std/haxe/io/Bytes.hx

+ 1 - 1
std/haxe/io/Bytes.hx

@@ -288,7 +288,7 @@ class Bytes {
 			return new String(b, pos, len, "UTF-8")
 		catch (e:Dynamic) throw e;
 		#elseif python
-		return python.Syntax.pythonCode("self.b[pos:pos+len].decode('UTF-8')");
+		return python.Syntax.pythonCode("self.b[pos:pos+len].decode('UTF-8','replace')");
 		#else
 		var s = "";
 		var b = b;