[rfc] unicode escapes for extended strings

From: Marko Kreen <markokr(at)gmail(dot)com>
To: Postgres Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: [rfc] unicode escapes for extended strings
Date: 2009-04-16 17:48:58
Message-ID: e51f66da0904161048nb50cbb2vc2caf27e8fc6cadb@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Seems I'm bad at communicating in english, so here is C variant of
my proposal to bring \u escaping into extended strings. Reasons:

- More people are familiar with \u escaping, as it's standard
in Java/C#/Python, probably more..
- U& strings will not work when stdstr=off.

Syntax:

\uXXXX - 16-bit value
\UXXXXXXXX - 32-bit value

Additionally, both \u and \U can be used to specify UTF-16 surrogate
pairs to encode characters with value > 0xFFFF. This is exact behaviour
used by Java/C#/Python. (except that Java does not have \U)

I'm ok with this patch left to 8.5.

--
marko

Attachment Content-Type Size
unicode.escape.diff text/x-patch 3.7 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Grzegorz Jaskiewicz 2009-04-16 18:04:34 Re: [GENERAL] Performance of full outer join in 8.3
Previous Message Tom Lane 2009-04-16 16:08:37 Re: Unicode string literals versus the world