From 50342e613515b9061d4fd07694314396a1b8cc1a Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Wed, 14 Oct 2009 19:08:41 +0200 Subject: [PATCH] MFB: Fix charset when exporting tasks to iCalendar 2.0 (Bug #8637). --- nag/docs/CHANGES | 1 + nag/lib/Task.php | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/nag/docs/CHANGES b/nag/docs/CHANGES index 006161c9b..c8f7c955e 100644 --- a/nag/docs/CHANGES +++ b/nag/docs/CHANGES @@ -13,6 +13,7 @@ v3.0-git v2.3.4-cvs ---------- +[jan] Fix charset when exporting tasks to iCalendar 2.0 (Bug #8637). [jan] Add Croatian translation (Matej Vela ). diff --git a/nag/lib/Task.php b/nag/lib/Task.php index 42c1ed196..e4f1f44a3 100644 --- a/nag/lib/Task.php +++ b/nag/lib/Task.php @@ -789,11 +789,11 @@ class Nag_Task { } if (!empty($this->name)) { - $vTodo->setAttribute('SUMMARY', $this->name); + $vTodo->setAttribute('SUMMARY', $v1 ? $this->name : String::convertCharset($this->name, NLS::getCharset(), 'utf-8')); } if (!empty($this->desc)) { - $vTodo->setAttribute('DESCRIPTION', $this->desc); + $vTodo->setAttribute('DESCRIPTION', $v1 ? $this->desc : String::convertCharset($this->desc, NLS::getCharset(), 'utf-8')); } if (isset($this->priority)) { @@ -839,7 +839,7 @@ class Nag_Task { } if (!empty($this->category)) { - $vTodo->setAttribute('CATEGORIES', $this->category); + $vTodo->setAttribute('CATEGORIES', $v1 ? $this->category : String::convertCharset($this->category, NLS::getCharset(), 'utf-8')); } /* Get the task's history. */ -- 2.11.0