From b20a3eaa33b6695bbb957ce8e299203f9a955f89 Mon Sep 17 00:00:00 2001 From: marvin78 Date: Mon, 9 Mar 2020 07:23:40 +0000 Subject: [PATCH] 98_todoist: UTF8 in project title git-svn-id: https://svn.fhem.de/fhem/trunk@21386 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/CHANGED | 1 + fhem/FHEM/98_todoist.pm | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/fhem/CHANGED b/fhem/CHANGED index a2ffba8b1..1cea6a558 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,5 +1,6 @@ # Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Do not insert empty lines here, update check depends on it. + - bugfix: 98_todoist: UTF in project title for Unicode Icons and Umlauts - bugfix: 36_Vallox: Fixed MultiReading Issue - feature: 70_BRAVIA: add requestReboot (thx schnakker) - change: 57_SSCal: commandref reviewed diff --git a/fhem/FHEM/98_todoist.pm b/fhem/FHEM/98_todoist.pm index d2f307bb4..11e051303 100644 --- a/fhem/FHEM/98_todoist.pm +++ b/fhem/FHEM/98_todoist.pm @@ -17,7 +17,7 @@ eval "use Date::Parse;1" or $missingModule .= "Date::Parse "; ####################### # Global variables -my $version = "1.3.5"; +my $version = "1.3.6"; my $srandUsed; @@ -984,7 +984,7 @@ sub todoist_GetTasksCallback($$$){ # set some internals (project data) if ($project) { - $hash->{PROJECT_NAME}=$project->{name}; + $hash->{PROJECT_NAME}=encode_utf8($project->{name}); $hash->{PROJECT_COLOR}=$project->{color}; $hash->{PROJECT_ORDER}=$project->{child_order}; if ($project->{user_id}) { @@ -2197,7 +2197,7 @@ sub todoist_Html(;$$$) { my $dueDate = defined($hash->{helper}{DUE_DATE}{$_})?$hash->{helper}{DUE_DATE}{$_}:""; my $responsibleUid = defined($hash->{helper}{RESPONSIBLE_UID}{$_})?$hash->{helper}{RESPONSIBLE_UID}{$_}:""; - $responsibleUid = $hash->{helper}{USER}{NAME}{$responsibleUid} if ($responsibleUid ne ""); + $responsibleUid = $hash->{helper}{USER}{NAME}{$responsibleUid} if ($responsibleUid ne "" && defined($hash->{helper}{USER}{NAME}{$responsibleUid})); my $dueDateClass = $dueDate ne ""?" todoist_dueDate":""; my $responsibleUidClass = $responsibleUid ne ""?" todoist_responsibleUid":"";