Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YTtez-00049M-Gj for pgsql-general@arkaria.postgresql.org; Fri, 06 Mar 2015 14:55:29 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YTtez-0003XG-0I for pgsql-general@arkaria.postgresql.org; Fri, 06 Mar 2015 14:55:29 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YTtex-0003XA-C8 for pgsql-general@postgresql.org; Fri, 06 Mar 2015 14:55:28 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by makus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YTtet-0002Ns-M7 for pgsql-general@postgresql.org; Fri, 06 Mar 2015 14:55:25 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 8B9DB20922 for ; Fri, 6 Mar 2015 09:55:20 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute4.internal (MEProxy); Fri, 06 Mar 2015 09:55:21 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=aklaver.com; h= x-sasl-enc:message-id:date:from:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; s=mesmtp; bh=OT54tTvm6E8aqdxh0XCZtlxZRgs=; b=iy8jZdoookn5UvF04P pD1xPq4knst3CCWSuprR4SwA2Oj76p0TZhuzsfsgEje2qRY6dlNHuQqKEK9pUH8Y R6XTuCCD1xj6UwhcY21y7xYtwMo2M+dgn0mz9XeH8sdVK4REdFDPaaaBAfTutktM 2xwsJR7qsY4jVmva6EE63EJus= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=x-sasl-enc:message-id:date:from :mime-version:to:subject:references:in-reply-to:content-type :content-transfer-encoding; s=smtpout; bh=OT54tTvm6E8aqdxh0XCZtl xZRgs=; b=eRfb5Jr89cMIrWgMlt7LfacEfr/QNGb62UUvFwoSTqUvkTBJH6bNNV +puyyjrwGNO5+kS9jZt7CmxOTC69GoZYhnTDYpYTKckMT5rJSPsXUDU3hIp4UvEQ fKQt+kZ/p0TA/kMy/Ovkj2hNTXJfR2wl187+IZzZ9lsA8Z0Vp1ig0= X-Sasl-enc: 98zfsvrj7YpsXOrPm6Yb3js/0lXE0vwXAeTTHrm/tBGa 1425653721 Received: from [192.168.1.4] (unknown [174.21.191.40]) by mail.messagingengine.com (Postfix) with ESMTPA id 53D42C00297; Fri, 6 Mar 2015 09:55:21 -0500 (EST) Message-ID: <54F9BFD8.7080907@aklaver.com> Date: Fri, 06 Mar 2015 06:55:20 -0800 From: Adrian Klaver User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: lsliang , pgsql-general Subject: Re: can postgresql supported utf8mb4 character sets? References: <201503051745459170125@pconline.com.cn> <201503061055293002598@pconline.com.cn> In-Reply-To: <201503061055293002598@pconline.com.cn> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-general Precedence: bulk Sender: pgsql-general-owner@postgresql.org On 03/05/2015 06:55 PM, lsliang wrote: > 2015-03-06 > * > * > ------------------------------------------------------------------------ > *发件人:*Adrian Klaver > *发送时间:*2015-03-05 21:31:39 > *收件人:*lsliang; pgsql-general > *抄送:* > *主题:*Re: [GENERAL] can postgresql supported utf8mb4 character sets? > On 03/05/2015 01:45 AM, lsliang wrote: > > can postgresql supported utf8mb4 character set? > > today mobile apps support 4-byte character and utf8 can only > > support 1-3 bytes character > The docs would seem to indicate otherwise: > http://www.postgresql.org/docs/9.3/interactive/multibyte.html > http://en.wikipedia.org/wiki/UTF-8 > > if load string to database which contain a 4-byte character > > will failed . > Have you actually tried to load strings in to Postgres? > If so and it failed what was the method you used and what was the error? > > mysql since 5.5.3 support utf8mb4 character sets > > I don't find some information about postgresql > > thanks > -- > Adrian Klaver > adrian.klaver@aklaver.com > >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> > thanks for your help . > postgresql can support 4-byte character > test=> select * from utf8mb4_test ; > ERROR: character with byte sequence 0xf0 0x9f 0x98 0x84 in encoding "UTF8" has no equivalent in encoding "GB18030" > test=> \encoding utf8 > test=> select * from utf8mb4_test ; > content > --------- > 😄 > 😄 > pcauto=> FYI, you can force the client encoding: http://www.postgresql.org/docs/9.4/interactive/app-psql.html "If both standard input and standard output are a terminal, then psql sets the client encoding to "auto", which will detect the appropriate client encoding from the locale settings (LC_CTYPE environment variable on Unix systems). If this doesn't work out as expected, the client encoding can be overridden using the environment variable PGCLIENTENCODING." -- Adrian Klaver adrian.klaver@aklaver.com -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general