[CalendarServer-changes] [14715] CalendarServer/trunk/txdav/xml
source_changes at macosforge.org
source_changes at macosforge.org
Mon Apr 27 12:31:51 PDT 2015
Revision: 14715
http://trac.calendarserver.org//changeset/14715
Author: cdaboo at apple.com
Date: 2015-04-27 12:31:51 -0700 (Mon, 27 Apr 2015)
Log Message:
-----------
Undo r14713.
Revision Links:
--------------
http://trac.calendarserver.org//changeset/14713
Modified Paths:
--------------
CalendarServer/trunk/txdav/xml/base.py
CalendarServer/trunk/txdav/xml/xmlext.py
Modified: CalendarServer/trunk/txdav/xml/base.py
===================================================================
--- CalendarServer/trunk/txdav/xml/base.py 2015-04-27 19:05:30 UTC (rev 14714)
+++ CalendarServer/trunk/txdav/xml/base.py 2015-04-27 19:31:51 UTC (rev 14715)
@@ -282,7 +282,7 @@
def writeXML(self, output, pretty=True):
- output.write("<?xml version='1.0' encoding='utf-8'?>" + ("\n" if pretty else ""))
+ output.write("<?xml version='1.0' encoding='UTF-8'?>" + ("\n" if pretty else ""))
self._writeToStream(output, "", 0, pretty)
Modified: CalendarServer/trunk/txdav/xml/xmlext.py
===================================================================
--- CalendarServer/trunk/txdav/xml/xmlext.py 2015-04-27 19:05:30 UTC (rev 14714)
+++ CalendarServer/trunk/txdav/xml/xmlext.py 2015-04-27 19:31:51 UTC (rev 14715)
@@ -28,7 +28,7 @@
XHTML_NAMESPACE = "http://www.w3.org/1999/xhtml"
-def Print(root, stream=sys.stdout, encoding='utf-8'):
+def Print(root, stream=sys.stdout, encoding='UTF-8'):
if not hasattr(root, "nodeType"):
return
nss = SeekNss(root)
@@ -38,7 +38,7 @@
-def PrettyPrint(root, stream=sys.stdout, encoding='utf-8', indent=' ',
+def PrettyPrint(root, stream=sys.stdout, encoding='UTF-8', indent=' ',
preserveElements=None):
if not hasattr(root, "nodeType"):
return
@@ -414,7 +414,7 @@
def strobj_to_utf8str(text, encoding):
- if string.upper(encoding) not in ["utf-8", "ISO-8859-1", "LATIN-1"]:
+ if string.upper(encoding) not in ["UTF-8", "ISO-8859-1", "LATIN-1"]:
raise ValueError("Invalid encoding: %s" % encoding)
encoder = codecs.lookup(encoding)[0] # encode,decode,reader,writer
if type(text) is not unicode:
@@ -444,7 +444,7 @@
# Note: Unicode object only for now
-def TranslateCdata(characters, encoding='utf-8', prev_chars='', markupSafe=0,
+def TranslateCdata(characters, encoding='UTF-8', prev_chars='', markupSafe=0,
charsetHandler=utf8_to_code):
"""
charsetHandler is a function that takes a string or unicode object as the
@@ -477,7 +477,7 @@
-def TranslateHtmlCdata(characters, encoding='utf-8', prev_chars=''):
+def TranslateHtmlCdata(characters, encoding='UTF-8', prev_chars=''):
# Translate numerical char entity references with HTML entity equivalents
new_string, _ignore_num_subst = re.subn(
g_cdataCharPattern,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20150427/e8f2cc82/attachment.html>
More information about the calendarserver-changes
mailing list