src/CFPropertyList/CFBinaryPropertyList.php
protected function readBinaryUnicodeString($length)
    {
      /* The problem is: we get the length of the string IN CHARACTERS;
         since a char in UTF-16 can be 16 or 32 bit long, we don't really know
         how long the string is in bytes */
        if (strlen($buff = substr($this->content, $this->pos, 2*$length)) != 2*$length) {
            throw IOException::readError("");
        }
        $this->pos += 2 * $length;

        if (!isset($this->uniqueTable[$buff])) {
            $this->uniqueTable[$buff] = true;
        }
        return new CFString(self::convertCharset($buff, "UTF-16BE", "UTF-8"));
    }
protected function readBinaryUnicodeString($length)
    {
      /* The problem is: we get the length of the string IN CHARACTERS;
         since a char in UTF-16 can be 16 or 32 bit long, we don't really know
         how long the string is in bytes */
        if (strlen($buff = substr($this->content, $this->pos, 2*$length)) != 2*$length) {
            throw IOException::readError("");
        }
        $this->pos += 2 * $length;

        if (!isset($this->uniqueTable[$buff])) {
            $this->uniqueTable[$buff] = true;
        }
        return new CFString(self::convertCharset($buff, "UTF-16BE", "UTF-8"));
    }
protected function readBinaryUnicodeString ( $ length ) { /* The problem is: we get the length of the string IN CHARACTERS;
         since a char in UTF-16 can be 16 or 32 bit long, we don't really know
         how long the string is in bytes */ if ( strlen ( $ buff = substr ( $ this -> content , $ this -> pos , 2 * $ length ) ) != 2 * $ length ) { throw IOException :: readError ( "" ) ; } $ this -> pos += 2 * $ length ; if ( ! isset ( $ this -> uniqueTable [ $ buff ] ) ) { $ this -> uniqueTable [ $ buff ] = true ; } return new CFString ( self :: convertCharset ( $ buff , "UTF-16BE" , "UTF-8" ) ) ; }
Read a unicode string value, coded as UTF-16BE
@param integer $length The length (in bytes) of the string value
@return CFString The string value, utf8 encoded
@throws IOException if read error occurs
Read a unicode string value coded as UTF - 16BE