Skip to content

Commit

Permalink
🐛 BASE #280 multiplas funções de conversão
Browse files Browse the repository at this point in the history
  • Loading branch information
bjverde committed Dec 14, 2022
1 parent 3cdd77a commit d3313db
Showing 1 changed file with 10 additions and 24 deletions.
34 changes: 10 additions & 24 deletions base/xajax/xajax.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -1257,38 +1257,24 @@ function _decodeUTF8Data($sData)
{
$sFuncToUse = NULL;

if (function_exists('iconv'))
{
if (function_exists('iconv')){
$sFuncToUse = "iconv";
}
else if (function_exists('mb_convert_encoding'))
{
}else if (function_exists('mb_convert_encoding')){
$sFuncToUse = "mb_convert_encoding";
}
else if ($this->sEncoding == "ISO-8859-1")
{
}else if ($this->sEncoding == "ISO-8859-1"){
$sFuncToUse = "utf8_decode";
}
else
{
}else{
trigger_error("The incoming xajax data could not be converted from UTF-8", E_USER_NOTICE);
}

if ($sFuncToUse)
{
if (is_string($sValue))
{
if ($sFuncToUse == "iconv")
{
if ($sFuncToUse){
if (is_string($sValue)){
if ($sFuncToUse == "iconv"){
$sValue = iconv("UTF-8", $this->sEncoding.'//TRANSLIT', $sValue);
}
else if ($sFuncToUse == "mb_convert_encoding")
{
}else if ($sFuncToUse == "mb_convert_encoding"){
$sValue = mb_convert_encoding($sValue, $this->sEncoding, "UTF-8");
}
else
{
$sValue = utf8_decode($sValue);
}else{
$sValue = StringHelper::utf8_decode($sValue);
}
}
}
Expand Down

0 comments on commit d3313db

Please sign in to comment.