public function write($string)
    {
        $converted = $this->converter->convert($string, $this->stringCharset, $this->streamCharset);
        $written = $this->converter->getLength($converted, $this->streamCharset);
        $this->position += $written;
        return $this->stream->write($converted);
    }
public function write($string)
    {
        $converted = $this->converter->convert($string, $this->stringCharset, $this->streamCharset);
        $written = $this->converter->getLength($converted, $this->streamCharset);
        $this->position += $written;
        return $this->stream->write($converted);
    }
public function write ( $ string ) { $ converted = $ this -> converter -> convert ( $ string , $ this -> stringCharset , $ this -> streamCharset ) ; $ written = $ this -> converter -> getLength ( $ converted , $ this -> streamCharset ) ; $ this -> position += $ written ; return $ this -> stream -> write ( $ converted ) ; }
Writes the passed string to the underlying stream after converting it to
the target stream encoding.

@param string $string
@return int the number of bytes written
Writes the passed string to the underlying stream after converting it to the target stream encoding .