protected function convertEncoding($data)
    {
        if (!$this->shouldConvert) {
            return $data;
        }
        return $this->stringConverter->convert("$data", 'utf-8', $this->getOption(self::ENCODING));
    }
protected function convertEncoding($data)
    {
        if (!$this->shouldConvert) {
            return $data;
        }
        return $this->stringConverter->convert("$data", 'utf-8', $this->getOption(self::ENCODING));
    }
protected function convertEncoding ( $ data ) { if ( ! $ this -> shouldConvert ) { return $ data ; } return $ this -> stringConverter -> convert ( "$data" , 'utf-8' , $ this -> getOption ( self :: ENCODING ) ) ; }
Converts encoding if needed.

@param string $data

@return string
Converts encoding if needed .