From: | Randall Lucas <rlucas(at)tercent(dot)net> |
---|---|
To: | Ian Barwick <barwick(at)gmx(dot)net> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: Using psql to insert character codes |
Date: | 2003-05-10 16:15:07 |
Message-ID: | 910584EC-8302-11D7-B164-000A957653D6@tercent.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Yes, use a Mac!
I'm not being entirely facetious -- if you can use a Mac OS X terminal
prompt (and if your pg config is substantially similar to mine),
inserting any unicode stuff is quite easy. Simply typing or
cutting-and-pasting at the terminal let me visually put in accented
Latin, Cyrillic, and Chinese (don't ask me what kind, I am a
sinoignoramus) no sweat.
Also, Java works well for this -- if you can write or use a Java app to
take advantage of its I18N, it will handle the encoding issues via JDBC
quite nicely as far as I can tell.
Best,
Randall
On Saturday, May 10, 2003, at 10:20 AM, 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'))
>
> Is there any other, shorter way of doing the same?
>
>
> Ian Barwick
> barwick(at)gmx(dot)net
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to
> majordomo(at)postgresql(dot)org)
>
From | Date | Subject | |
---|---|---|---|
Next Message | Ian Barwick | 2003-05-10 16:53:20 | Re: Using psql to insert character codes |
Previous Message | Ian Barwick | 2003-05-10 14:20:24 | Using psql to insert character codes |