Skip to content

Commit

Permalink
2024.09.09-nimble-neem-hotfix-2024-09-29
Browse files Browse the repository at this point in the history
Co-authored-by: Limber Mamani <[email protected]>
  • Loading branch information
pachonjcl and LimberHope authored Sep 9, 2024
1 parent be7fa61 commit 7745b35
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions app/Exports/V2/BaseExportFormSubmission.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,21 @@ protected function getAnswer(array $field, array $answers): string
return $this->stringifyModel($answer, ['first_name', 'last_name', 'title', 'gender', 'percent_ownership', 'year_of_birth',]);

default:
$utf8Answer = mb_convert_encoding($answer, 'UTF-8', mb_detect_encoding($answer));
if (is_string($answer)) {
$utf8Answer = mb_convert_encoding($answer, 'UTF-8', mb_detect_encoding($answer));
} else {
$utf8Answer = $answer;
}

return json_encode($utf8Answer, JSON_UNESCAPED_UNICODE);
}
}

$utf8Answer = mb_convert_encoding($answer, 'UTF-8', mb_detect_encoding($answer));
if (is_string($answer)) {
$utf8Answer = mb_convert_encoding($answer, 'UTF-8', mb_detect_encoding($answer));
} else {
$utf8Answer = $answer;
}

return json_encode($utf8Answer, JSON_UNESCAPED_UNICODE);
}
Expand Down

0 comments on commit 7745b35

Please sign in to comment.