Received: from localhost (unknown [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id B73CA2E323D for ; Thu, 10 Jan 2008 15:54:36 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 72299-08 for ; Thu, 10 Jan 2008 15:48:32 -0400 (AST) Received: from eagle.jhcloos.com (eagle.jhcloos.com [207.210.242.212]) by postgresql.org (Postfix) with ESMTP id B7C282E3113 for ; Thu, 10 Jan 2008 15:48:32 -0400 (AST) Received: by eagle.jhcloos.com (Postfix, from userid 10) id 8B0694017B; Thu, 10 Jan 2008 19:48:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jhcloos.com; s=eagle; t=1199994509; bh=aAtec2tWvj1JOOqKs1t3F2bM1LMW2Eq29Ii2tWwz8 lk=; h=From:To:Subject:User-Agent:Face:Copyright:OpenPGP: OpenPGP-Fingerprint:X-Hashcash:Date:Message-ID:Lines:MIME-Version: Content-Type:Content-Transfer-Encoding; b=lCw08arbfJVd7YiNTnf+Dz4s Zit2KeRg8yVHuDV1/vTLnMaqSEbNNf2XZaVfaVHhaEEXrLqzYKwGKh1qstN0JG4enHu vVUr3IRT/QoDOi0j0je0kwOcNVmcPyC5ExFdv4YjfBvOSc+RM7AjON4f7AFRdG5FNs1 aKm0wHObDIidA= Received: by lugabout.jhcloos.org (Postfix, from userid 500) id 0CC58214EA8; Thu, 10 Jan 2008 19:48:13 +0000 (UTC) From: James Cloos To: pgsql-sql@postgresql.org Subject: Escape sequence for UTF-8 Character Literals? User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.60 (gnu/linux) Face: iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAI1J REFUOE+lU9ESgCAIg64P1y+ngUdxhl5H8wFbbM0OmUiEhKkCYaZThXCo6KE5sCbA1DDX3genvO4d eBQgEMaM5qy6uWk4SfBYfdu9jvBN9nSVDOKRtwb+I3epboOsOX5pZbJNsBJFvmQQ05YMfieIBnYX FK2N6dOawd97r/e8RjkTLzmMsiVgrAoEugtviCM3v2WzjgAAAABJRU5ErkJggg== Copyright: Copyright 2007 James Cloos OpenPGP: ED7DAEA6; url=http://jhcloos.com/public_key/0xED7DAEA6.asc OpenPGP-Fingerprint: E9E9 F828 61A4 6EA9 0F2B 63E7 997A 9F17 ED7D AEA6 X-Hashcash: 1:23:080110:pgsql-sql@postgresql.org::1q5ZYbZVFSiUXoL4:0000000000000000000000000000000000000T1Sl Date: Thu, 10 Jan 2008 19:48:12 +0000 Message-ID: Lines: 16 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200801/75 X-Sequence-Number: 29928 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 OpenPGP: 1024D/ED7DAEA6