Re: How to convert Big5 to UTF8 - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: How to convert Big5 to UTF8
Date
Msg-id 20060120135743.GA31908@svana.org
Whole thread Raw
In response to How to convert Big5 to UTF8  (Alex CS Huang <alex@smoc.com.tw>)
List pgsql-general
On Fri, Jan 20, 2006 at 09:56:40AM +0800, Alex CS Huang wrote:
> Hi, All,
>   I create a database which encoding is UTF8, and create a table test
> create table test ( name varchar);
>   I insert a data '\244\350' encoding is Big5, I wish translate them to
> UTF8, so I use
>   insert into test values ('convert('\244\350' using big5_to_utf_8));
>   I got an error:
>   ERROR:  invalid byte sequence for encoding "UNICODE": 0xe8;
>
>   How could I do for this problem? any ideas.

How about something like:

\set encoding=big5;
insert into test values ('\244\350');

or maybe: set client_encoding=big5;

within an app.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

Attachment

pgsql-general by date:

Previous
From: Sebastjan Trepca
Date:
Subject: Re: How to fetch rows with multiple values
Next
From: Stephan Vollmer
Date:
Subject: Creation of tsearch2 index is very slow