There is a problem with character sets: It seems the
flag "ascii encoding" is misleading - it looks more
like "single byte encoding" (in my case iso-8859-1).
So these strings also need to be recoded, as the
target charset might not be whatever is in the file.
Even pure ascii has to be translated if the output is
set to e.g. utf-16.
Logged In: YES
user_id=607090
Originator: NO
I have the same problem.
E had a same problem. This is working for me:
- $retstr = ($asciiEncoding) ? $retstr : $this->_encodeUTF16($retstr);
+ $retstr = ($asciiEncoding) ? $this->_encodeASCII($retstr) : $this->_encodeUTF16($retstr);
+ function _encodeASCII($string)
+ {
+ $result = $string;
+ if ($this->_defaultEncoding){
+ switch ($this->_encoderFunction){
+ case 'iconv' : $result = iconv('ISO-8859-1', $this->_defaultEncoding, $string);
+ break;
+ case 'mb_convert_encoding' : $result = mb_convert_encoding($string, $this->_defaultEncoding,'ISO-8859-1');
+ break;
+ }
+ }
+ return $result;
+ }
+