Forráskód Böngészése

Merge pull request #3095 from mandel59/python-bytes-bug

[python] fix haxe.io.Bytes#getString
frabbit 11 éve
szülő
commit
869d20b5d6
1 módosított fájl, 2 hozzáadás és 0 törlés
  1. 2 0
      std/haxe/io/Bytes.hx

+ 2 - 0
std/haxe/io/Bytes.hx

@@ -287,6 +287,8 @@ class Bytes {
 		try
 			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','replace')");
 		#else
 		var s = "";
 		var b = b;