Revision: 4288
Author: pekka.klarck
Date: Wed Nov 17 07:04:23 2010
Log: another workaround for IronPython bug, related to issue 154
http://code.google.com/p/robotframework/source/detail?r=4288

Modified:
 /trunk/src/robot/utils/pyxmlwriter.py

=======================================
--- /trunk/src/robot/utils/pyxmlwriter.py       Wed Nov 17 05:36:26 2010
+++ /trunk/src/robot/utils/pyxmlwriter.py       Wed Nov 17 07:04:23 2010
@@ -12,6 +12,7 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.

+import sys
 from xml.sax.saxutils import XMLGenerator
 from xml.sax.xmlreader import AttributesImpl

@@ -45,3 +46,8 @@
         self._writer.endDocument()
         self._output.close()
         self.closed = True
+
+    # Workaround for http://ironpython.codeplex.com/workitem/29474
+    if sys.platform == 'cli':
+        def _encode(self, content):
+            return AbstractXmlWriter._encode(self, content).encode('UTF-8')

Reply via email to