Re: encoding error in python 27

2013-02-24 Thread Peter Otten
Hala Gamal wrote: > thank you :)it worked well for small file but when i enter big file,, i > obtain this error: "Traceback (most recent call last): > File "D:\Python27\yarab (4).py", line 46, in > writer.add_document(**doc) > File "build\bdist.win32\egg\whoosh\filedb\filewriting.py", lin

Re: encoding error in python 27

2013-02-23 Thread Hala Gamal
thank you :)it worked well for small file but when i enter big file,, i obtain this error: "Traceback (most recent call last): File "D:\Python27\yarab (4).py", line 46, in writer.add_document(**doc) File "build\bdist.win32\egg\whoosh\filedb\filewriting.py", line 369, in add_document

Re: encoding error in python 27

2013-02-22 Thread MRAB
On 2013-02-22 14:55, Hala Gamal wrote: my code works well with english file but when i use text file encodede"utf-8" "my file contain some arabic letters" it doesn't work. my code: # encoding: utf-8 from whoosh import fields, index import os.path import re,string import codecs from whoosh.qparse

Re: encoding error in python 27

2013-02-22 Thread Peter Otten
Hala Gamal wrote: > my code works well with english file but when i use text file > encodede"utf-8" "my file contain some arabic letters" it doesn't work. my > code: > with codecs.open("tt.txt",encoding='utf-8') as txtfile: Try encoding="utf-8-sig" in the above to remove the byte order mark (B

encoding error in python 27

2013-02-22 Thread Hala Gamal
my code works well with english file but when i use text file encodede"utf-8" "my file contain some arabic letters" it doesn't work. my code: # encoding: utf-8 from whoosh import fields, index import os.path import re,string import codecs from whoosh.qparser import QueryParser # This list associa