Re: UTF-8 Encoding Error

2016-12-29 Thread subhabangalore
On Friday, December 30, 2016 at 7:16:25 AM UTC+5:30, Steve D'Aprano wrote: > On Sun, 25 Dec 2016 04:50 pm, Grady Martin wrote: > > > On 2016年12月22日 22時38分, wrote: > >>I am getting the error: > >>UnicodeDecodeError: 'utf8' codec can't decode byte 0x96 in position 15: > >>invalid start byte > > > >

Re: UTF-8 Encoding Error

2016-12-29 Thread Steve D'Aprano
On Sun, 25 Dec 2016 04:50 pm, Grady Martin wrote: > On 2016年12月22日 22時38分, subhabangal...@gmail.com wrote: >>I am getting the error: >>UnicodeDecodeError: 'utf8' codec can't decode byte 0x96 in position 15: >>invalid start byte > > The following is a reflex of mine, whenever I encounter Python 2

Re: UTF-8 Encoding Error

2016-12-29 Thread subhabangalore
On Friday, December 30, 2016 at 3:35:56 AM UTC+5:30, subhaba...@gmail.com wrote: > On Monday, December 26, 2016 at 3:37:37 AM UTC+5:30, Gonzalo V wrote: > > Try utf-8-sig > > El 25 dic. 2016 2:57 AM, "Grady Martin" <> escribió: > > > > > On 2016年12月22日 22時38分, wrote: > > > > > >> I am getting the

Re: UTF-8 Encoding Error

2016-12-29 Thread subhabangalore
On Monday, December 26, 2016 at 3:37:37 AM UTC+5:30, Gonzalo V wrote: > Try utf-8-sig > El 25 dic. 2016 2:57 AM, "Grady Martin" <> escribió: > > > On 2016年12月22日 22時38分, wrote: > > > >> I am getting the error: > >> UnicodeDecodeError: 'utf8' codec can't decode byte 0x96 in position 15: > >> inval

Re: UTF-8 Encoding Error

2016-12-25 Thread Gonzalo V
Try utf-8-sig El 25 dic. 2016 2:57 AM, "Grady Martin" escribió: > On 2016年12月22日 22時38分, subhabangal...@gmail.com wrote: > >> I am getting the error: >> UnicodeDecodeError: 'utf8' codec can't decode byte 0x96 in position 15: >> invalid start byte >> > > The following is a reflex of mine, whenever

Re: UTF-8 Encoding Error

2016-12-24 Thread Grady Martin
On 2016年12月22日 22時38分, subhabangal...@gmail.com wrote: I am getting the error: UnicodeDecodeError: 'utf8' codec can't decode byte 0x96 in position 15: invalid start byte The following is a reflex of mine, whenever I encounter Python 2 Unicode errors: import sys reload(sys) sys.setdefaultencod

Re: UTF-8 Encoding Error

2016-12-22 Thread Cameron Simpson
On 22Dec2016 22:38, Subhabrata Banerjee wrote: I am getting the error: UnicodeDecodeError: 'utf8' codec can't decode byte 0x96 in position 15: invalid start byte as I try to read some files through TaggedCorpusReader. TaggedCorpusReader is a module of NLTK. My files are saved in ANSI format i

UTF-8 Encoding Error

2016-12-22 Thread subhabangalore
I am getting the error: UnicodeDecodeError: 'utf8' codec can't decode byte 0x96 in position 15: invalid start byte as I try to read some files through TaggedCorpusReader. TaggedCorpusReader is a module of NLTK. My files are saved in ANSI format in MS-Windows default. I am using Python2.7 on MS-

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

Re: encoding error

2013-02-19 Thread Terry Reedy
On 2/19/2013 8:07 PM, halagamal2...@gmail.com wrote: UnicodeEncodeError: 'decimal' codec can't encode character u'\ufeff' in position 0: invalid decimal Unicode string I believe that is a byte-order mark, which should only be the first 2 bytes in the file and which should be removed if you use

encoding error

2013-02-19 Thread halagamal2009
i'm trying to make indexing of csv file contain arabic words my code: from whoosh import fields, index import os.path import csv import codecs # This list associates a name with each position in a row columns = ["juza","chapter","verse","voc","analysis", "unvoc","root"] schema = fields.Schema(juza

Re: Embedding python : can't find encoding error

2011-03-01 Thread swapnil
On Feb 28, 4:57 pm, Mathieu CLERICI wrote: > Hi, > > I'm trying to embed python in a c++ program. > I have compiled python32.lib with msvc 2010 targetting 32bits, i link > it with my program wich is also 32bit. > I get an error when calling Py_Initialize() : "no codec search > functions registered

Re: Embedding python : can't find encoding error

2011-02-28 Thread Mathieu CLERICI
Precisions : I'm trying to embed python 3.2 release. -- http://mail.python.org/mailman/listinfo/python-list

Embedding python : can't find encoding error

2011-02-28 Thread Mathieu CLERICI
Hi, I'm trying to embed python in a c++ program. I have compiled python32.lib with msvc 2010 targetting 32bits, i link it with my program wich is also 32bit. I get an error when calling Py_Initialize() : "no codec search functions registered: can't find encoding" Py_FileSystemDefaultEncoding val

Re: Ascii Encoding Error with UTF-8 encoder

2006-06-27 Thread Serge Orlov
On 6/27/06, Mike Currie <[EMAIL PROTECTED]> wrote: > Thanks for the thorough explanation. > > What I am doing is converting data for processing that will be tab (for > columns) and newline (for row) delimited. Some of the data contains tabs > and newlines so, I have to convert them to something e

Re: Ascii Encoding Error with UTF-8 encoder

2006-06-27 Thread John Machin
On 28/06/2006 9:44 AM, Mike Currie wrote: > > What I am doing is converting data for processing that will be tab (for > columns) and newline (for row) delimited. Some of the data contains tabs > and newlines so, I have to convert them to something else so the file > integrity is good. > > No

Re: Ascii Encoding Error with UTF-8 encoder

2006-06-27 Thread Mike Currie
27;ve been left with the implementation however. "John Machin" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On 28/06/2006 7:46 AM, Mike Currie wrote: >> Can anyone explain why I'm getting an ascii encoding error when I'm >> trying to

Re: Ascii Encoding Error with UTF-8 encoder

2006-06-27 Thread John Machin
On 28/06/2006 7:46 AM, Mike Currie wrote: > Can anyone explain why I'm getting an ascii encoding error when I'm trying > to write out using a UTF-8 encoder? > >>>> f = codecs.open('foo.txt', 'wU', 'utf-8') >>>> prin

Re: Ascii Encoding Error with UTF-8 encoder

2006-06-27 Thread Robert Kern
Mike Currie wrote: > Can anyone explain why I'm getting an ascii encoding error when I'm trying > to write out using a UTF-8 encoder? Please read the Python Unicode HOWTO. http://www.amk.ca/python/howto/unicode -- Robert Kern "I have come to believe that the whole

Ascii Encoding Error with UTF-8 encoder

2006-06-27 Thread Mike Currie
Can anyone explain why I'm getting an ascii encoding error when I'm trying to write out using a UTF-8 encoder? Thanks Python 2.4.3 (#69, Mar 29 2006, 17:35:34) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license"

Re: sqlite utf8 encoding error

2005-11-21 Thread Greg Miller
Thanks again, I'll look into this method. Greg Miller -- http://mail.python.org/mailman/listinfo/python-list

Re: sqlite utf8 encoding error

2005-11-19 Thread Manlio Perillo
On 18 Nov 2005 09:09:24 -0800, "Greg Miller" <[EMAIL PROTECTED]> wrote: >Thank you for all your suggestions. I ended up casting the string to >unicode prior to inserting into the database. > Don't do it by hand if it can be done by an automated system. Try with: from pysqlite2 import dbapi2

Re: sqlite utf8 encoding error

2005-11-18 Thread Greg Miller
Thank you for all your suggestions. I ended up casting the string to unicode prior to inserting into the database. Greg Miller -- http://mail.python.org/mailman/listinfo/python-list

Re: sqlite utf8 encoding error

2005-11-18 Thread Manlio Perillo
On 17 Nov 2005 03:47:00 -0800, "Greg Miller" <[EMAIL PROTECTED]> wrote: >I have an application that uses sqlite3 to store job/error data. When >I log in as a German user the error codes generated are translated into >German. The error code text is then stored in the db. When I use the >fetchall

Re: sqlite utf8 encoding error

2005-11-17 Thread Serge Orlov
Jarek Zgoda wrote: > Fredrik Lundh napisa³(a): > > >>UnicodeDecodeError: 'utf8' codec can't decode bytes in position 13-18: > >>unsupported Unicode code range > >> > >>does anyone have any idea on what could be going wrong? The string > >>that I store in the database table is: > >> > >>'Keinen Tex

Re: sqlite utf8 encoding error

2005-11-17 Thread Jarek Zgoda
Fredrik Lundh napisał(a): >>UnicodeDecodeError: 'utf8' codec can't decode bytes in position 13-18: >>unsupported Unicode code range >> >>does anyone have any idea on what could be going wrong? The string >>that I store in the database table is: >> >>'Keinen Text für Übereinstimmungsfehler gefunde

Re: sqlite utf8 encoding error

2005-11-17 Thread Sybren Stuvel
Greg Miller enlightened us with: > 'Keinen Text für Übereinstimmungsfehler gefunden' You posted it as "Keinen Text fr ...", which is Latin-1, not UTF-8. > I thought that all strings were stored in unicode in sqlite. Only if you put them into the DB as such. Make sure you're inserting UTF-8 text,

Re: sqlite utf8 encoding error

2005-11-17 Thread Fredrik Lundh
Greg Miller wrote: > UnicodeDecodeError: 'utf8' codec can't decode bytes in position 13-18: > unsupported Unicode code range > > does anyone have any idea on what could be going wrong? The string > that I store in the database table is: > > 'Keinen Text für Übereinstimmungsfehler gefunden' $ mor

sqlite utf8 encoding error

2005-11-17 Thread Greg Miller
I have an application that uses sqlite3 to store job/error data. When I log in as a German user the error codes generated are translated into German. The error code text is then stored in the db. When I use the fetchall() to retrieve the data to generate a report I get the following error: Trac

Re: utf encoding error

2005-05-04 Thread Mike Thompson
Timothy Smith wrote: > hi there, this one is in relation to my py2exe saga. > > when i compile a package using py2exe i get the error msg below, if i > just run the py files it doesn't error, so i assume pysvn is trying to > use something thats not being included in the build. only i have no ide

utf encoding error

2005-05-04 Thread Timothy Smith
hi there, this one is in relation to my py2exe saga. when i compile a package using py2exe i get the error msg below, if i just run the py files it doesn't error, so i assume pysvn is trying to use something thats not being included in the build. only i have no idea where to start looking. Tra