From emilu@encs.concordia.ca Thu Oct 30 17:38:00 2014 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
From akretschmer@spamfence.net Thu Oct 30 17:46:05 2014 Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XjtnQ-0003eX-UW for pgsql-sql@arkaria.postgresql.org; Thu, 30 Oct 2014 17:46:05 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XjtnQ-00035g-AI for pgsql-sql@arkaria.postgresql.org; Thu, 30 Oct 2014 17:46:04 +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 1XjtnP-00035Z-7K for pgsql-sql@postgresql.org; Thu, 30 Oct 2014 17:46:03 +0000 Received: from mailout02.ims-firmen.de ([213.174.32.97]) by makus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1XjtnK-0005Kc-QZ for pgsql-sql@postgresql.org; Thu, 30 Oct 2014 17:46:01 +0000 Received: from mailin03.ims-firmen.de ([192.168.1.143]) by mailout02.ims-firmen.de with esmtp (envelope-from ) id 1XjtnH-0007Cn-lu for pgsql-sql@postgresql.org; Thu, 30 Oct 2014 18:45:55 +0100 Received: from [217.95.249.225] (helo=a-kretschmer.de) by mailin03.ims-firmen.de with esmtpsa (TLSv1:AES256-SHA:256) (envelope-from ) id 1XjtnH-0003RA-8w for pgsql-sql@postgresql.org; Thu, 30 Oct 2014 18:45:55 +0100 Received: from kretschmer by a-kretschmer.de with local (Exim 4.69) (envelope-from ) id 1XjtnH-0001y9-9z for pgsql-sql@postgresql.org; Thu, 30 Oct 2014 18:45:55 +0100 Date: Thu, 30 Oct 2014 18:45:55 +0100 From: Andreas Kretschmer To: pgsql-sql@postgresql.org Subject: Re: return encoding results Message-ID: <20141030174555.GA7494@tux> References: <54527772.2080203@encs.concordia.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <54527772.2080203@encs.concordia.ca> X-OS: Debian/GNU Linux - weil ich es mir Wert bin! X-GPG-Fingerprint: EE16 3C01 7B9C 10F7 2C8B 3B86 4DB3 D9EE 7F45 84DA X-Message-Flag: "Windows" is not the answer. "Windows" is the question and the answer is "no"! X-Lugdd: Gerd Kube X-Info: My name is root. Just root. And I am licensed to kill -9 User-Agent: Mutt/1.5.18 (2008-05-17) X-Pg-Spam-Score: -1.2 (-) 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 Emi Lu wrote: > Hello, > > Does psql provide function that can return specific encoding results? For > example, > > select function_name('é', unicode); Maybe convert(), see: http://www.postgresql.org/docs/9.3/interactive/functions-string.html Andreas -- Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect. (Linus Torvalds) "If I was god, I would recompile penguin with --enable-fly." (unknown) Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889° -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql