Re: overriding character escapes during file input

2006-09-03 Thread John Machin
John Machin wrote: > David J Birnbaum wrote: > > Dear Python-list, > > > > I need to read a Unicode (utf-8) file that contains text like: > > > blah \fR40\fC blah > > I get my input and then process it with something like: > > > inputFile = codecs.open(sys.argv[1],'r', 'utf-8') > > > > > > for lin

Re: overriding character escapes during file input

2006-09-02 Thread John Machin
David J Birnbaum wrote: > Dear Python-list, > > I need to read a Unicode (utf-8) file that contains text like: > > blah \fR40\fC blah > I get my input and then process it with something like: > > inputFile = codecs.open(sys.argv[1],'r', 'utf-8') > > > > for line in inputFile: > When Python encount

overriding character escapes during file input

2006-09-02 Thread David J Birnbaum
Dear Python-list, I need to read a Unicode (utf-8) file that contains text like: > blah \fR40\fC blah I get my input and then process it with something like: > inputFile = codecs.open(sys.argv[1],'r', 'utf-8') > > for line in inputFile: When Python encounters the "\f" substring in an input line, i