Re: How can I insert a UTF-8 character with psql? - Mailing list pgsql-general

From Ian Barwick
Subject Re: How can I insert a UTF-8 character with psql?
Date
Msg-id 200306131828.28335.barwick@gmx.net
Whole thread Raw
In response to Re: How can I insert a UTF-8 character with psql?  (Roland Glenn McIntosh <roland@steeltorch.com>)
List pgsql-general
On Friday 13 June 2003 15:57, Roland Glenn McIntosh wrote:
> Ian - Thank you very much for your reply.  It only seems to half work,
> however. This Euro sign is giving me a headache.
> I tried both of the following:
>
>         UPDATE my_tbl SET value='\40\254' WHERE NAME LIKE 'curr%';
> and
>         UPDATE my_tbl SET value=encode(decode('20ac','hex'), 'escape')
> WHERE NAME LIKE 'curr%'; and
>         UPDATE my_tbl SET value='\040\254' WHERE NAME LIKE 'curr%';

<reminder_to_self>think before posting</reminder_to_self>

You will of course need to convert the two-byte Unicode UCS-2 value into
the UTF-8 equivalent.


Ian Barwick
barwick@gmx.net


pgsql-general by date:

Previous
From: Manfred Koizar
Date:
Subject: Re: Table name specified more than once
Next
From: Ernest E Vogelsinger
Date:
Subject: Re: Query planner question