Add UTF-8 encoding for reading bulk updates #33

Merged
marko merged 1 commits from patch-utf8encoding into dev 2025-10-15 04:51:20 +00:00
2 changed files with 7 additions and 6 deletions

View File

@@ -1,4 +1,4 @@
UPD 2025-10-14_10:40:53 10358 FHEM/73_NUKIBridge.pm
UPD 2025-10-14_10:41:09 11100 FHEM/74_NUKIDevice.pm
UPD 2025-10-14_10:42:11 42820 lib/FHEM/Devices/Nuki/Bridge.pm
UPD 2025-10-14_10:42:04 16698 lib/FHEM/Devices/Nuki/Device.pm
UPD 2025-10-14_11:00:54 10358 FHEM/73_NUKIBridge.pm
UPD 2025-10-14_11:00:54 11100 FHEM/74_NUKIDevice.pm
UPD 2025-10-14_11:00:54 42820 lib/FHEM/Devices/Nuki/Bridge.pm
UPD 2025-10-15_06:43:51 16775 lib/FHEM/Devices/Nuki/Device.pm

View File

@@ -30,7 +30,7 @@ use strict;
use warnings;
#use experimental qw( switch );
use Encode;
use FHEM::Meta;
use GPUtils qw(GP_Import);
@@ -550,7 +550,8 @@ sub WriteReadings {
while ( ( $t, $v ) = each %{$decode_json} ) {
# generische readings (alles außer spezielle Felder)
::readingsBulkUpdate( $hash, $t, $v )
::readingsBulkUpdate( $hash, $t,
Encode::is_utf8($v) ? Encode::encode( "UTF-8", $v ) : $v )
if ( $t ne 'state'
&& $t ne 'mode'
&& $t ne 'deviceType'