Re: unicode compare errors

2010-12-13 Thread Ross
On Dec 10, 4:09 pm, Nobody wrote: > On Fri, 10 Dec 2010 11:51:44 -0800, Ross wrote: > > Since I can't control the encoding of the input file that users > > submit, how to I get past this?  How do I make such comparisons be > > True? > On Fri, 10 Dec 2010 12:07:19 -0800, Ross wrote: > > I found I c

Re: unicode compare errors

2010-12-10 Thread Nobody
On Fri, 10 Dec 2010 11:51:44 -0800, Ross wrote: > Since I can't control the encoding of the input file that users > submit, how to I get past this? How do I make such comparisons be > True? On Fri, 10 Dec 2010 12:07:19 -0800, Ross wrote: > I found I could import codecs that allow me to read the

Re: unicode compare errors

2010-12-10 Thread Ross
On Dec 10, 2:51 pm, Ross wrote: > Initially I was simply doing: > >   currs = [u'$', u'£', u'€', u'¥'] >   aFile = open(thisFile, 'r') >   for mline in aFile:              # mline might be "£5.50" >      if item[0] in currs: >           item = item[1:] > Don't you love it when someone solves the