Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Xjtfc-0003DQ-Dz for pgsql-sql@arkaria.postgresql.org; Thu, 30 Oct 2014 17:38:00 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Xjtfb-0001eZ-NF for pgsql-sql@arkaria.postgresql.org; Thu, 30 Oct 2014 17:37:59 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Xjtfa-0001eT-So for pgsql-sql@postgresql.org; Thu, 30 Oct 2014 17:37:59 +0000 Received: from oldperseverance.encs.concordia.ca ([132.205.96.92]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XjtfX-00057r-FD for pgsql-sql@postgresql.org; Thu, 30 Oct 2014 17:37:57 +0000 Received: from cacao.encs.concordia.ca (emilu@cacao.encs.concordia.ca [132.205.47.225]) by oldperseverance.encs.concordia.ca (envelope-from emilu@encs.concordia.ca) (8.13.7/8.13.7) with ESMTP id s9UHbsLX017726 for ; Thu, 30 Oct 2014 13:37:54 -0400 Message-ID: <54527772.2080203@encs.concordia.ca> Date: Thu, 30 Oct 2014 13:37:54 -0400 From: Emi Lu Reply-To: emilu@encs.concordia.ca User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.8.1 MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: return encoding results Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.58 on oldperseverance.encs.concordia.ca at 2014-10-30 13:37:54 EDT X-Pg-Spam-Score: 0.1 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-sql Precedence: bulk Sender: pgsql-sql-owner@postgresql.org Hello,

Does psql provide function that can return specific encoding results? For example,

select function_name('é', unicode);

To return:      \u00e9

Thanks a lot!
Emi
--
select function_name('
á', unicode);  To return: \u00e0
... ...
á  \u00e0   Á  \u00c0
à  \u00e1   À  \u00c1
â  \u00e2     \u00c2
é  \u00e9   É  \u00c9
è  \u00e8   È  \u00c8
ê  \u00ea   Ê  \u00ca
î  \u00ee   Π \u00ce
ç  \u00e7   Ç  \u00c7