MFB: Fix charset when exporting tasks to iCalendar 2.0 (Bug #8637).
authorJan Schneider <jan@horde.org>
Wed, 14 Oct 2009 17:08:41 +0000 (19:08 +0200)
committerJan Schneider <jan@horde.org>
Wed, 14 Oct 2009 17:08:41 +0000 (19:08 +0200)
nag/docs/CHANGES
nag/lib/Task.php

index 006161c..c8f7c95 100644 (file)
@@ -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 <matej.vela@carnet.hr>).
 
 
index 42c1ed1..e4f1f44 100644 (file)
@@ -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. */