FHEMWEB/SVG: fixing "encoding unicode" features (Forum #126088)

git-svn-id: https://svn.fhem.de/fhem/trunk@25730 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2022-02-22 18:34:39 +00:00
parent 369065e928
commit 6d35c91aae
2 changed files with 4 additions and 2 deletions

View File

@ -638,6 +638,7 @@ FW_finishRead($$$)
$compressed = "Content-Encoding: gzip\r\n";
}
}
$FW_encodedByPlugin = undef;
my $length = length($FW_RET);
my $expires = ($cacheable ?
@ -1002,10 +1003,10 @@ FW_answerCall($)
foreach my $k (reverse sort keys %{$data{FWEXT}}) {
my $h = $data{FWEXT}{$k};
next if($arg !~ m/^$k/);
$FW_encodedByPlugin = 1;
$FW_contentFunc = $h->{CONTENTFUNC};
next if($h !~ m/HASH/ || !$h->{FUNC});
#Returns undef as FW_RETTYPE if it already sent a HTTP header
$FW_encodedByPlugin = 1;
no strict "refs";
($FW_RETTYPE, $FW_RET) = &{$h->{FUNC}}($arg);
if(defined($FW_RETTYPE) && $FW_RETTYPE =~ m,text/html,) {

View File

@ -554,7 +554,7 @@ EOF
$ret .=
"FW_cmd('$sl', function(arg){" .<<"EOF";
FW_okDialog(arg);
});
}); // {
});
setTimeout(function(){
\$("table.internals div[informid=$gpfEsc-GPLOTFILE]")
@ -1219,6 +1219,7 @@ SVG_doShowLog($$$$;$)
}
}
$FW_RET = Encode::encode('UTF-8', $FW_RET) if($unicodeEncoding);
return ($FW_RETTYPE, $FW_RET);
}