Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YnzWA-0001tE-IO for pgsql-bugs@arkaria.postgresql.org; Fri, 01 May 2015 01:13:26 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YnzWA-0003xt-22 for pgsql-bugs@arkaria.postgresql.org; Fri, 01 May 2015 01:13:26 +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 1YnzW8-0003vz-Qh for pgsql-bugs@postgresql.org; Fri, 01 May 2015 01:13:24 +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 1YnzW2-0004K9-1O for pgsql-bugs@postgresql.org; Fri, 01 May 2015 01:13:23 +0000 Received: from bruce by momjian.us with local (Exim 4.72) (envelope-from ) id 1YnzVz-0004yX-Tc; Thu, 30 Apr 2015 21:13:15 -0400 Date: Thu, 30 Apr 2015 21:13:15 -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: <20150501011315.GC6342@momjian.us> References: <20150309205145.4031.32069@wrigleys.postgresql.org> <54FF633B.9090006@iki.fi> <54FF7147.20204@iki.fi> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54FF7147.20204@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 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? -- 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