parameters, since otherwise readlines doesn't return unicode (at least in
some cases, observed with python-2.6.2). Also, fix grabfile() to return
unicode when it normalizes whitespace.
svn path=/main/trunk/; revision=13837
for x in mylines:
#the split/join thing removes leading and trailing whitespace, and converts any whitespace in the line
#into single spaces.
- myline=" ".join(x.split())
+ myline = u' '.join(x.split())
if not len(myline):
continue
if myline[0]=="#":
os.path.join(myfilename, f), recursive))
else:
try:
- myfile = codecs.open(myfilename, mode='r', errors='replace')
+ myfile = codecs.open(myfilename, mode='r',
+ encoding=sys.getdefaultencoding(), errors='replace')
mylines = myfile.readlines()
myfile.close()
except IOError, e: