Re: How can I insert a UTF-8 character with psql?

From: Ian Barwick <barwick(at)gmx(dot)net>
To: Roland Glenn McIntosh <roland(at)steeltorch(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: How can I insert a UTF-8 character with psql?
Date: 2003-06-13 16:28:28
Message-ID: 200306131828.28335.barwick@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)gmx(dot)net

In response to

Browse pgsql-general by date

  From Date Subject
Next Message scott.marlowe 2003-06-13 16:39:57 Re: Performance question..
Previous Message Manfred Koizar 2003-06-13 16:17:26 Re: Table name specified more than once