From: | Marko Kreen <markokr(at)gmail(dot)com> |
---|---|
To: | Postgres Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [rfc] unicode escapes for extended strings |
Date: | 2009-09-09 15:26:59 |
Message-ID: | e51f66da0909090826m3cc51825icb1615cbb9f3b37d@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Unicode escapes for extended strings.
On 4/16/09, Marko Kreen <markokr(at)gmail(dot)com> wrote:
> 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)
v3 of the patch:
- convert to new reentrant lexer API
- add lexer targets to avoid fallback to default
- completely disallow \U\u without proper number of hex values
- fix logic bug in surrogate pair handling
--
marko
Attachment | Content-Type | Size |
---|---|---|
unicode-escapes-v3.diff | text/x-diff | 4.8 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Maarten Foqué | 2009-09-09 15:57:34 | corrupted double-linked list |
Previous Message | Tom Lane | 2009-09-09 15:23:27 | Re: More robust pg_hba.conf parsing/error logging |