cp1250/Utf8 problem
Closed this issue · 2 comments
Vitexus commented
Hi,
i want use Windows-1250 encoded input, It work in most cases, but https://github.com/riesenia/pohoda/blob/master/src/Pohoda/Common/OptionsResolver.php#L69 use hardcoded Utf-8
return \mb_substr($value, 0, $param, 'utf-8');
Which make use of other encodings inpossible.
stancl commented
Can you do something like this?
$this->response->addHeader('Content-Type: text/xml; charset=windows-1250');
$this->response->setOutput($this->pohoda->close());
Vitexus commented
Hallo, @stancl at least i push data into mServer using only pure unicode XML
\Riesenia\Pohoda::$encoding = 'UTF-8';
Thus there is no need to convert anything. Fortunately Pohoda is accepting
<?xml version="1.0" encoding="UTF-8"?>
My original problem was in understaning to Pohodas's documentation. I'd think that cp1250 is only encoding i can use.