Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Yo2s5-0002cD-RX for pgsql-bugs@arkaria.postgresql.org; Fri, 01 May 2015 04:48:18 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Yo2s4-00048s-SN for pgsql-bugs@arkaria.postgresql.org; Fri, 01 May 2015 04:48:16 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Yo2s4-00048m-2n for pgsql-bugs@postgresql.org; Fri, 01 May 2015 04:48:16 +0000 Received: from mail-pd0-x231.google.com ([2607:f8b0:400e:c02::231]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1Yo2s0-0002Vl-Ou for pgsql-bugs@postgresql.org; Fri, 01 May 2015 04:48:15 +0000 Received: by pdbqa5 with SMTP id qa5so81989511pdb.1 for ; Thu, 30 Apr 2015 21:48:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:reply-to:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=t3Qyh8tSf8uSZa7zIbLTAlaT+QrNgE8x5XQcPxrju9s=; b=oAmz9Ahq+5ECAaJhn48n2mqm2XApNUJZkPTNDLhmNrtRDOwDlVTGWRhuZQtI+/7XIk HmzFhjliM9a2FUw18Cfox0ZYsclKhENEJjJx77YSF0B9aN1pTsSzOB6+PVVyYrBAQPUE h0DzQY1bZOKMk1MA+dD3s8tPP59M5UM8ByjuujsvOaiZYtx8Eu0dJdBlo7lEoUZhCBc/ ORAmW2J0v8zmWLqxIZlJn1XPBMHnd5oDH1rhVE4bWITmcsyD0X4FcSKQqtTy0NH2pSJ9 bIWlD9Ad0knCod851KRw0dQje4SFJ8fRAL2F5QgZN11QKKM1DwRr67IeDPogmhfsxyZH 1AEQ== X-Received: by 10.70.35.171 with SMTP id i11mr14410516pdj.103.1430455689989; Thu, 30 Apr 2015 21:48:09 -0700 (PDT) Received: from [172.20.101.172] ([66.201.48.54]) by mx.google.com with ESMTPSA id kt3sm3627170pbc.90.2015.04.30.21.48.08 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Apr 2015 21:48:09 -0700 (PDT) Message-ID: <55430588.9060402@iki.fi> Date: Thu, 30 Apr 2015 21:48:08 -0700 From: Heikki Linnakangas Reply-To: hlinnaka@iki.fi User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.6.0 MIME-Version: 1.0 To: Bruce Momjian CC: Arjen Nienhuis , pgsql-bugs@postgresql.org Subject: Re: BUG #12845: The GB18030 encoding doesn't support Unicode characters over 0xFFFF References: <20150309205145.4031.32069@wrigleys.postgresql.org> <54FF633B.9090006@iki.fi> <54FF7147.20204@iki.fi> <20150501011315.GC6342@momjian.us> In-Reply-To: <20150501011315.GC6342@momjian.us> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.4 (--) 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 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