[Python-checkins] r56807 - tracker/importer/fixsfmojibake.py

martin.v.loewis python-checkins at python.org
Tue Aug 7 22:43:52 CEST 2007


Author: martin.v.loewis
Date: Tue Aug  7 22:43:52 2007
New Revision: 56807

Modified:
   tracker/importer/fixsfmojibake.py
Log:
Add missing assignment of input data.


Modified: tracker/importer/fixsfmojibake.py
==============================================================================
--- tracker/importer/fixsfmojibake.py	(original)
+++ tracker/importer/fixsfmojibake.py	Tue Aug  7 22:43:52 2007
@@ -14,6 +14,8 @@
 # ASCII, and that non-ASCII characters are always encoded
 # as decimal character references.
 
+# Usage: fixsfmojibake.py < xml_export.php > sf.xml
+
 import sys, re
 
 expr = re.compile('(&#[0-9]+;)+')
@@ -30,6 +32,7 @@
     chars = ['&#%d;' % ord(c) for c in chars]
     return ''.join(chars)
 
+indata = sys.stdin.read()
 print >>sys.stderr, len(indata)
 
 # Make sure that there are only &#decimal; references,


More information about the Python-checkins mailing list