Surrogate pairs in UTF-8

From: Dave Rosckes <dave(dot)rosckes(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Surrogate pairs in UTF-8
Date: 2015-01-16 14:16:47
Message-ID: CAEtyQx0KtCin3axb4LfOk9KRJeQ9zs7ABLQ3UrN2pgcG6QZ85g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have written a test program using postgres that creates a string with a
surrogate pair. I then insert that string into a varchar property in a
table.

I then execute a select statement to pull the string out. But when I
evaluate the string the lead char of the pair is correct, but the following
pair value is mangled. I run this exact same code using DB2 and it works
just fine.

Is this a postgres limitation, or is there a specific way surrogate pairs
need to be handled?

Thanks,

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Chris Mair 2015-01-16 14:37:58 Re: Out of Memory
Previous Message Daniel Begin 2015-01-16 12:36:01 Re: Indexing large table of coordinates with GiST