Thread: Parsing characters' problem in Python
hi. i'm trying parse file has words accent. this, use codecs.open ('nameoffile', 'r', 'utf-8'). then, every line in open document, re.search () find if current line matches pattern. if that's so, print line, , add line list l, using l.append (line).
problem when print lines inside loop words printed fine, accents. after quit loop , try print contents of line l, every single character having accent printed wrong way. don't understand this, before fine , happens when print strings corresponding list.
thoughts. thanks!
Forum The Ubuntu Forum Community Ubuntu Specialised Support Development & Programming Programming Talk Parsing characters' problem in Python
Ubuntu
Comments
Post a Comment