royale-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ha...@apache.org
Subject [royale-asjs] branch develop updated: If we’re going to return UTF8, it should be consistent
Date Mon, 11 Jun 2018 11:20:11 GMT
This is an automated email from the ASF dual-hosted git repository.

harbs pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git


The following commit(s) were added to refs/heads/develop by this push:
     new 5802e83  If we’re going to return UTF8, it should be consistent
5802e83 is described below

commit 5802e83a3d725e42c1968e46ed28a53bc0a0b555
Author: Harbs <harbs@in-tools.com>
AuthorDate: Mon Jun 11 14:19:59 2018 +0300

    If we’re going to return UTF8, it should be consistent
    
    I’m not confinced we should have a toString() method at all.
---
 .../Core/src/main/royale/org/apache/royale/utils/BinaryData.as      | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/BinaryData.as
b/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/BinaryData.as
index 3a7cf28..4b4114b 100644
--- a/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/BinaryData.as
+++ b/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/BinaryData.as
@@ -213,10 +213,8 @@ public class BinaryData implements IBinaryDataInput, IBinaryDataOutput
 
         COMPILE::JS
         {
-            if('TextDecoder' in window)
-                return (new TextDecoder("utf-8")).decode(ba); //this doesn't work on IE/Edge
-            else
-                return String.fromCharCode.apply(null, new Uint16Array(ba));
+            _position = 0;
+            return readUTFBytes(length);
         }
 	}
 

-- 
To stop receiving notification emails like this one, please contact
harbs@apache.org.

Mime
View raw message