diff --git a/fhem/FHEM/01_FHEMWEB.pm b/fhem/FHEM/01_FHEMWEB.pm index 3a15ed065..bfdcbac69 100755 --- a/fhem/FHEM/01_FHEMWEB.pm +++ b/fhem/FHEM/01_FHEMWEB.pm @@ -464,6 +464,7 @@ FW_Read($$) ($FW_httpheader{"Accept-Encoding"} && $FW_httpheader{"Accept-Encoding"} =~ m/gzip/) && $FW_use_zlib) { + utf8::encode($FW_RET) if(utf8::is_utf8($FW_RET)); eval { $FW_RET = Compress::Zlib::memGzip($FW_RET); }; if($@) { Log 1, "memGzip: $@"; $FW_RET=""; #Forum #29939 diff --git a/fhem/FHEM/98_telnet.pm b/fhem/FHEM/98_telnet.pm index 30660a326..1a4388f87 100644 --- a/fhem/FHEM/98_telnet.pm +++ b/fhem/FHEM/98_telnet.pm @@ -316,6 +316,7 @@ telnet_Output($$$) $ret = "$ret\n" if(!$hash->{showPrompt}); } for(;;) { + utf8::encode($ret) if(utf8::is_utf8($ret)); my $l = syswrite($hash->{CD}, $ret); last if(!$l || $l == length($ret)); $ret = substr($ret, $l);