pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: James Cloos <cloos@jhcloos.com>
To: pgsql-sql@postgresql.org
Subject: Escape sequence for UTF-8 Character Literals?
Date: Thu, 10 Jan 2008 19:48:12 +0000
Message-ID: <m34pdlsbr7.fsf@lugabout.jhcloos.org> (raw)

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@jhcloos.com>         OpenPGP: 1024D/ED7DAEA6





Message-ID: <m34pdlsbr7.fsf@lugabout.jhcloos.org>
Permalink:  ../m34pdlsbr7.fsf@lugabout.jhcloos.org/
Also on:    postgresql.org/message-id/m34pdlsbr7.fsf@lugabout.jhcloos.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: cloos@jhcloos.com
  Subject: Re: Escape sequence for UTF-8 Character Literals?
  In-Reply-To: <m34pdlsbr7.fsf@lugabout.jhcloos.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox