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
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
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
I've a character encoding issue that has stumped me (not that hard to
do). I am parsing a small text file with some possibility of various
currencies being involved, and want to handle them without messing up.
Initially I was simply doing:
currs = [u'$', u'£', u'€', u'¥']
aFile = open(thisFil