Browse Source

Fixing ZF-9640:
All strings are not UTF encoded.

Also fixed a small spelling error in BinaryStream.php I discovered while researching this.

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@22028 44c647ce-9c0f-0410-b52a-842ac1e357ba

calevans 15 năm trước cách đây
mục cha
commit
5c644898cb

+ 1 - 1
library/Zend/Amf/Parse/Amf3/Serializer.php

@@ -239,7 +239,7 @@ class Zend_Amf_Parse_Amf3_Serializer extends Zend_Amf_Parse_Serializer
         $ref = array_search($string, $this->_referenceStrings, true);
         if($ref === false){
             $this->_referenceStrings[] = $string;
-            $this->writeBinaryString($string);
+            $this->writeBinaryString(utf8_encode($string));
         } else {
             $ref <<= 1;
             $this->writeInteger($ref);

+ 1 - 1
library/Zend/Amf/Util/BinaryStream.php

@@ -177,7 +177,7 @@ class Zend_Amf_Util_BinaryStream
     }
 
     /**
-     * Wite a UTF-8 string to the outputstream
+     * Write a UTF-8 string to the outputstream
      *
      * @param  string $stream
      * @return Zend_Amf_Util_BinaryStream