2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 12:49:34 +00:00

98_fhemdebug.pm: better output for utf8check (FOrum #125866)

git-svn-id: https://svn.fhem.de/fhem/trunk@25658 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2022-02-08 14:29:37 +00:00
parent 2fe7ffb226
commit 2236f07d78

View File

@ -103,14 +103,17 @@ fhemdebug_utf8check($$$$)
$vp->{$path} = 1;
my $val = $hp->{$key};
push( @{$rp}, "Key: ".$prefix."::".$key)
if(utf8::is_utf8($key) || $key =~ m/[^\x00-\xFF]/);
my $rv = ref($val);
if($rv eq "HASH") {
fhemdebug_utf8check($path, $val, $rp, $vp);
} elsif($rv eq "ARRAY") {
} elsif(!defined($val) || $rv eq "ARRAY") {
} elsif(utf8::is_utf8($val)) {
push @{$rp}, $path . " => " . $hp->{$key};
} elsif(utf8::is_utf8($val) || $val =~ m/[^\x00-\xFF]/) {
push @{$rp}, "Key: ".$path." Value:".$hp->{$key};
}
}