pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <hlinnaka@iki.fi>
To: Bruce Momjian <bruce@momjian.us>
Cc: Arjen Nienhuis <a.g.nienhuis@gmail.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #12845: The GB18030 encoding doesn't support Unicode characters over 0xFFFF
Date: Thu, 30 Apr 2015 21:48:08 -0700
Message-ID: <55430588.9060402@iki.fi> (raw)
In-Reply-To: <20150501011315.GC6342@momjian.us>
References: <20150309205145.4031.32069@wrigleys.postgresql.org>
	<54FF633B.9090006@iki.fi>
	<CAG6W84JZ-ZFhAM1GQzpVUOW8YM2gx6_-f4uCKU1j2sdmt+wO6g@mail.gmail.com>
	<54FF7147.20204@iki.fi>
	<20150501011315.GC6342@momjian.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

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.

- Heikki


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (7+ messages)  latest in thread

Message-ID: <55430588.9060402@iki.fi>
Permalink:  ../55430588.9060402@iki.fi/
Also on:    postgresql.org/message-id/55430588.9060402@iki.fi

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: hlinnaka@iki.fi, bruce@momjian.us, a.g.nienhuis@gmail.com
  Subject: Re: BUG #12845: The GB18030 encoding doesn't support Unicode characters over 0xFFFF
  In-Reply-To: <55430588.9060402@iki.fi>
  References: <20150309205145.4031.32069@wrigleys.postgresql.org> <54FF633B.9090006@iki.fi> <CAG6W84JZ-ZFhAM1GQzpVUOW8YM2gx6_-f4uCKU1j2sdmt+wO6g@mail.gmail.com> <54FF7147.20204@iki.fi> <20150501011315.GC6342@momjian.us> <55430588.9060402@iki.fi>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox