Fix unicode bug

This commit is contained in:
Valentin Lorentz 2010-11-28 17:47:38 +01:00
parent 15de8c2345
commit f2a0b60e79

View File

@ -61,6 +61,7 @@ def rsplit(s, sep=None, maxsplit=-1):
def normalizeWhitespace(s, removeNewline=True): def normalizeWhitespace(s, removeNewline=True):
"""Normalizes the whitespace in a string; \s+ becomes one space.""" """Normalizes the whitespace in a string; \s+ becomes one space."""
s = str(s)
if removeNewline: if removeNewline:
s = str.replace(s, '\n', '') s = str.replace(s, '\n', '')
while ' ' in s: while ' ' in s: