Re: Using psql to insert character codes - Mailing list pgsql-sql

From Ian Barwick
Subject Re: Using psql to insert character codes
Date
Msg-id 200305101935.56006.barwick@gmx.net
Whole thread Raw
In response to Using psql to insert character codes  (Ian Barwick <barwick@gmx.net>)
List pgsql-sql
On Saturday 10 May 2003 16:20, Ian Barwick wrote:
> Say using psql I wish to insert a character into a VARCHAR / TEXT /
> whatever column using the its hexadecimal representation in the relevant
> character set / encoding. E.g.: C3A4, which represents the character 'ä'
> (lower case a with umlaut) in UTF-8.
>
> I can do this:
> INSERT INTO my_tbl (unitxt) VALUE(encode(decode('c3a4','hex'), 'escape'))

correction:
INSERT INTO my_tbl (unitxt) VALUES(encode(decode('c3a4','hex'), 'escape'))

Ian Barwick
barwick@gmx.net



pgsql-sql by date:

Previous
From: Ian Barwick
Date:
Subject: Re: Using psql to insert character codes
Next
From: Randall Lucas
Date:
Subject: Re: Using psql to insert character codes