Re: BUG #12845: The GB18030 encoding doesn't support Unicode characters over 0xFFFF

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Cc: Arjen Nienhuis <a(dot)g(dot)nienhuis(at)gmail(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #12845: The GB18030 encoding doesn't support Unicode characters over 0xFFFF
Date: 2015-05-01 13:37:13
Message-ID: 20150501133713.GI6342@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Thu, Apr 30, 2015 at 09:48:08PM -0700, Heikki Linnakangas wrote:
> On 04/30/2015 06:13 PM, Bruce Momjian wrote:
> >On Tue, Mar 10, 2015 at 11:33:43PM +0100, Heikki Linnakangas wrote:
> >>>I can write a "uint32 UTF8toGB18030(uint32)" function, but I don't know
> >>>where to put it in the code.
> >>
> >>The mapping functions are in src/backend/utils/mb/conversion_procs/utf8_and_gb18030/utf8_and_gb18030.c.
> >>They currently just consult the mapping table. You'd need to modify
> >>them to also check if the codepoint is in one of those linear
> >>ranges, and do the mapping for those programmatically.
> >>
> >>>Else I could also extend the map file. It would double in size if it only
> >>>needs to include valid code points.
> >>
> >>The current mapping table contains about 63000 mappings, but there
> >>are over a million valid code points that need to be mapped. If you
> >>just add every one-to-one mapping to the table, it's going to blow
> >>up in size to over 8 MB. I don't think we want that, handling the
> >>ranges with linear mappings programmatically makes a lot more sense.
> >
> >Should this be a TODO entry?
>
> Yeah, I guess it should.

Done.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ Everyone has their own god. +

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2015-05-01 17:08:54 Re: Failure to coerce unknown type to specific type
Previous Message Bruce Momjian 2015-05-01 13:19:35 Re: BUG #12843: pg_dump -O inserts four unwanted lines to the end of the dump