[icalendar-checkins] r30946 - in iCalendar/trunk: . src/icalendar
regebro at codespeak.net
regebro at codespeak.net
Thu Aug 3 15:35:22 CEST 2006
Author: regebro
Date: Thu Aug 3 15:35:15 2006
New Revision: 30946
Modified:
iCalendar/trunk/CHANGES.txt
iCalendar/trunk/src/icalendar/cal.py
Log:
make get_inline and set_inline support non ascii codes
Modified: iCalendar/trunk/CHANGES.txt
==============================================================================
--- iCalendar/trunk/CHANGES.txt (original)
+++ iCalendar/trunk/CHANGES.txt Thu Aug 3 15:35:15 2006
@@ -1,4 +1,7 @@
-iCalendar trunk (1.0?) (unreleased)
-===================================
+iCalendar 1.0
+=============
+
+* make get_inline and set_inline support non ascii codes. (ogrisel at nuxeo.com)
+
+* Added support for creating a python egg distribution. (lregebro at nuxeo.com)
-* Added support for creating a python egg distribution.
\ No newline at end of file
Modified: iCalendar/trunk/src/icalendar/cal.py
==============================================================================
--- iCalendar/trunk/src/icalendar/cal.py (original)
+++ iCalendar/trunk/src/icalendar/cal.py Thu Aug 3 15:35:15 2006
@@ -18,7 +18,7 @@
from icalendar.caselessdict import CaselessDict
from icalendar.parser import Contentlines, Contentline, Parameters
from icalendar.parser import q_split, q_join
-from icalendar.prop import TypesFactory
+from icalendar.prop import TypesFactory, vText
######################################
@@ -260,7 +260,8 @@
"""
Returns a list of values (split on comma).
"""
- vals = [v.strip('" ') for v in q_split(self[name])]
+ vals = [v.strip('" ').encode(vText.encoding)
+ for v in q_split(self[name])]
if decode:
return [self._decode(name, val) for val in vals]
return vals
@@ -273,7 +274,8 @@
"""
if encode:
values = [self._encode(name, value, 1) for value in values]
- self[name] = types_factory['inline'](q_join(values))
+ joined = q_join(values).encode(vText.encoding)
+ self[name] = types_factory['inline'](joined)
#########################
More information about the icalendar-checkins
mailing list