Re: Text search, ERROR: invalid byte sequence for encoding "UTF8": 0xe9640a

Lists: pgsql-general
From: James Dooley <jamdooley(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Text search, ERROR: invalid byte sequence for encoding "UTF8": 0xe9640a
Date: 2009-02-03 15:12:32
Message-ID: c01aff630902030712t6b023242w8feaf14a65f46f11@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

I downloaded the hunspell en_GB from

http://wiki.services.openoffice.org/wiki/Dictionaries#English_.28AU.2CCA.2CGB.2CNZ.2CUS.2CZA.29

and when building the Ispell dictionary I got the following error

ERROR: invalid byte sequence for encoding "UTF8": 0xe9640a
HINT: This error can also happen if the byte sequence does not match the
encoding expected by the server, which is controlled by "client_encoding".
CONTEXT: line 220 of configuration file "C:/Program
Files/PostgreSQL/8.3/share/tsearch_data/en_gb.dict"

CREATE TEXT SEARCH DICTIONARY english_ispell (
TEMPLATE = ispell,
DictFile = en_GB,
AffFile = en_GB,
StopWords = english
);


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: James Dooley <jamdooley(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Text search, ERROR: invalid byte sequence for encoding "UTF8": 0xe9640a
Date: 2009-02-03 15:37:07
Message-ID: 26864.1233675427@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

James Dooley <jamdooley(at)gmail(dot)com> writes:
> and when building the Ispell dictionary I got the following error

> ERROR: invalid byte sequence for encoding "UTF8": 0xe9640a

What PG version? 8.3.x before 8.3.4 had some problems in this area.

regards, tom lane


From: James Dooley <jamdooley(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Text search, ERROR: invalid byte sequence for encoding "UTF8": 0xe9640a
Date: 2009-02-03 15:46:55
Message-ID: c01aff630902030746o2ab6e191n8bce6e9f0b39a21b@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

It's postgresql-8.3.5-2 (windows)

On Tue, Feb 3, 2009 at 4:37 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> James Dooley <jamdooley(at)gmail(dot)com> writes:
> > and when building the Ispell dictionary I got the following error
>
> > ERROR: invalid byte sequence for encoding "UTF8": 0xe9640a
>
> What PG version? 8.3.x before 8.3.4 had some problems in this area.
>
> regards, tom lane
>


From: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
To: James Dooley <jamdooley(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Text search, ERROR: invalid byte sequence for encoding "UTF8": 0xe9640a
Date: 2009-02-03 16:08:18
Message-ID: Pine.LNX.4.64.0902031907150.4158@sn.sai.msu.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

James,

you forgot to convert files to UTF8.
iconv -f ISO8859-1 -t utf8 en_GB.dic > en_gb.dict
iconv -f ISO8859-1 -t utf8 en_GB.aff > en_gb.affix

Oleg
On Tue, 3 Feb 2009, James Dooley wrote:

> I downloaded the hunspell en_GB from
>
> http://wiki.services.openoffice.org/wiki/Dictionaries#English_.28AU.2CCA.2CGB.2CNZ.2CUS.2CZA.29
>
> and when building the Ispell dictionary I got the following error
>
> ERROR: invalid byte sequence for encoding "UTF8": 0xe9640a
> HINT: This error can also happen if the byte sequence does not match the
> encoding expected by the server, which is controlled by "client_encoding".
> CONTEXT: line 220 of configuration file "C:/Program
> Files/PostgreSQL/8.3/share/tsearch_data/en_gb.dict"
>
> CREATE TEXT SEARCH DICTIONARY english_ispell (
> TEMPLATE = ispell,
> DictFile = en_GB,
> AffFile = en_GB,
> StopWords = english
> );
>

Regards,
Oleg
_____________________________________________________________
Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru),
Sternberg Astronomical Institute, Moscow University, Russia
Internet: oleg(at)sai(dot)msu(dot)su, http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83