Skip site navigation (1) Skip section navigation (2)

Re: ERROR: translation failed from server encoding to wchar_t

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: ilanco(at)gmail(dot)com
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: ERROR: translation failed from server encoding to wchar_t
Date: 2008-01-08 02:14:59
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
ilanco(at)gmail(dot)com writes:
> I am using tsearch2 with pgsql 8.2.5 and get the following error when
> calling to_tsvector :
> "translation failed from server encoding to wchar_t"

> My database is UTF8 encoded and the data sent to to_tsvector comes
> from a bytea column converted to text with
> encode(COLUMN, 'escape').

Two likely theories:

1. Your database encoding is UTF-8, but your locale (LC_CTYPE) assumes
some other encoding.

2. The encode() is yielding something that isn't valid UTF-8.

PG 8.3 contains checks that should complain about both of these
scenarios, but IIRC 8.2 does not.

			regards, tom lane

In response to


pgsql-hackers by date

Next:From: Joshua D. DrakeDate: 2008-01-08 02:21:25
Subject: Re: Bug: Unreferenced temp tables disables vacuum to update xid
Previous:From: Gregory StarkDate: 2008-01-08 02:12:28
Subject: Re: Dynamic Partitioning using Segment Visibility Maps

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group