Skip to content

Commit

Permalink
Fixed issue #13495: Character äöü and ß shown as ? at QueXML-Export (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
adamzammit authored and c-schmitz committed Mar 22, 2018
1 parent 63513d9 commit e592ee8
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions application/libraries/admin/quexmlpdf.php
Expand Up @@ -2022,7 +2022,7 @@ public function createqueXML($quexml)
$sqtmp['varname'] = $sq['varName'];

if (isset($sq['defaultValue'])) {
$sqtmp['defaultvalue'] = $sq['defaultValue'];
$sqtmp['defaultvalue'] = current($sq['defaultValue']);
}

if (isset($sq->contingentQuestion)) {
Expand All @@ -2038,7 +2038,7 @@ public function createqueXML($quexml)
}

if (isset($sq->contingentQuestion['defaultValue'])) {
$oarr['defaultvalue'] = $sq->contingentQuestion['defaultValue'];
$oarr['defaultvalue'] = current($sq->contingentQuestion['defaultValue']);
}

$oarr['varname'] = $sq->contingentQuestion['varName'];
Expand All @@ -2063,7 +2063,7 @@ public function createqueXML($quexml)
}

if (isset($r['defaultValue'])) {
$rstmp['defaultvalue'] = $r['defaultValue'];
$rstmp['defaultvalue'] = current($r['defaultValue']);
}

if (isset($r->fixed)) {
Expand Down Expand Up @@ -2101,7 +2101,7 @@ public function createqueXML($quexml)
}

if (isset($c->contingentQuestion['defaultValue'])) {
$oarr['defaultvalue'] = $c->contingentQuestion['defaultValue'];
$oarr['defaultvalue'] = current($c->contingentQuestion['defaultValue']);
}

$oarr['varname'] = $c->contingentQuestion['varName'];
Expand Down Expand Up @@ -3009,7 +3009,7 @@ protected function drawText($text, $width, $defaultvalue = false)

$string = false;
if ($defaultvalue !== false) {
$string = substr($defaultvalue, $startstring, $cells);
$string = mb_substr($defaultvalue, $startstring, $cells, "UTF-8");
}

$this->drawCells($cells, $string);
Expand Down Expand Up @@ -3073,10 +3073,7 @@ protected function drawCells($cells, $string)
//Add the box to the layout scheme
$this->addBox($this->GetX(), $this->GetY(), $this->GetX() + $this->textResponseWidth, $this->GetY() + $this->textResponseHeight);

$text = '';
if (isset($string[$j])) {
$text = $string[$j];
}
$text = mb_substr($string,$j,1,"UTF-8");

//Draw the box
$this->Cell($this->textResponseWidth, $this->textResponseHeight, $text, $border, 0, '', true, '', 0, false, 'T', 'C');
Expand Down Expand Up @@ -3139,7 +3136,7 @@ protected function drawMatrixTextHorizontal($subquestions, $width, $parenttext =
if ($bgtype != 6) {
$string = false;
if (isset($s['defaultvalue'])) {
$string = substr($s['defaultvalue'], 0, $width);
$string = mb_substr($s['defaultvalue'], 0, $width,"UTF-8");
}

//Draw the cells
Expand Down

0 comments on commit e592ee8

Please sign in to comment.