Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YoB83-0002ug-Tf for pgsql-bugs@arkaria.postgresql.org; Fri, 01 May 2015 13:37:20 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YoB83-00080q-EW for pgsql-bugs@arkaria.postgresql.org; Fri, 01 May 2015 13:37:19 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YoB82-00080k-OY for pgsql-bugs@postgresql.org; Fri, 01 May 2015 13:37:18 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1YoB80-0001GF-4y for pgsql-bugs@postgresql.org; Fri, 01 May 2015 13:37:17 +0000 Received: from bruce by momjian.us with local (Exim 4.72) (envelope-from ) id 1YoB7x-00020w-Lj; Fri, 01 May 2015 09:37:13 -0400 Date: Fri, 1 May 2015 09:37:13 -0400 From: Bruce Momjian To: Heikki Linnakangas Cc: Arjen Nienhuis , pgsql-bugs@postgresql.org Subject: Re: BUG #12845: The GB18030 encoding doesn't support Unicode characters over 0xFFFF Message-ID: <20150501133713.GI6342@momjian.us> References: <20150309205145.4031.32069@wrigleys.postgresql.org> <54FF633B.9090006@iki.fi> <54FF7147.20204@iki.fi> <20150501011315.GC6342@momjian.us> <55430588.9060402@iki.fi> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55430588.9060402@iki.fi> User-Agent: Mutt/1.5.20 (2009-06-14) X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org 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 http://momjian.us EnterpriseDB http://enterprisedb.com + Everyone has their own god. + -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs