98_SVG.pm: "set readonly" in .gplot File (Forum #126561)

git-svn-id: https://svn.fhem.de/fhem/trunk@25777 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig
2022-03-05 10:24:57 +00:00
parent 65b74adc0c
commit 0c7411c83c
2 changed files with 5 additions and 2 deletions

View File

@@ -529,7 +529,9 @@ SVG_PEdit($$$$)
}
$ret .= "<tr class=\"".(($r++&1)?"odd":"even")."\"><td colspan=\"3\">";
$ret .= FW_submit("submit", "Write .gplot file")."&nbsp;".
$ret .= (exists($conf{readonly}) ?
'<span>.gplot file is "set readonly"</span>' :
FW_submit("submit", "Write .gplot file")."&nbsp;").
FW_submit("showFileLogData", "Show preprocessed input").
"</td></tr>";

View File

@@ -3872,7 +3872,8 @@ DoTrigger($$@)
my $txt = ($inform{$c}{type} eq "timer" ? "$t " : "").
"$hash->{TYPE} $dev $event\n";
my $enc = $dc->{encoding} && $dc->{encoding} eq "latin1" ? "Latin1":"UTF-8";
my $enc = $dc->{encoding} &&
$dc->{encoding} eq "latin1" ? "Latin1":"UTF-8";
$txt = Encode::encode($enc, $txt) if($unicodeEncoding);
addToWritebuffer($dc, $txt);
}