Escape sequence for UTF-8 Character Literals?

From: James Cloos <cloos(at)jhcloos(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Escape sequence for UTF-8 Character Literals?
Date: 2008-01-10 19:48:12
Message-ID: m34pdlsbr7.fsf@lugabout.jhcloos.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

I’ve a data set in a text file which uses the U+XXXX syntax for UCS
characters which I want to enter into a (utf8) db, using the actual
characters rather than the codepoint names.

The docs give the impression that eg E'\x91D1' ought to be the same
as '金', but my tests show that \x only accepts 2 hex digits.

Is doing the conversion client side the only way to do this?

I’m on 8.2, if the answer is version-dependent.

-JimC
--
James Cloos <cloos(at)jhcloos(dot)com> OpenPGP: 1024D/ED7DAEA6

Browse pgsql-sql by date

  From Date Subject
Next Message Simon Riggs 2008-01-10 19:53:44 Re: trigger for TRUNCATE?
Previous Message Tom Lane 2008-01-10 19:15:24 Re: trigger for TRUNCATE?