Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XVKoO-0003Yr-OQ for pgsql-bugs@arkaria.postgresql.org; Sat, 20 Sep 2014 13:34:52 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XVKoN-0007MJ-QV for pgsql-bugs@arkaria.postgresql.org; Sat, 20 Sep 2014 13:34:51 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XV6TD-0005gN-Cg for pgsql-bugs@postgresql.org; Fri, 19 Sep 2014 22:16:03 +0000 Received: from sam.nabble.com ([216.139.236.26]) by magus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1XV6T7-00024A-Gb for pgsql-bugs@postgresql.org; Fri, 19 Sep 2014 22:16:01 +0000 Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1XV6T3-0003kr-Ci for pgsql-bugs@postgresql.org; Fri, 19 Sep 2014 15:15:53 -0700 Date: Fri, 19 Sep 2014 15:15:53 -0700 (PDT) From: Alon To: pgsql-bugs@postgresql.org Message-ID: <1411164953375-5819745.post@n5.nabble.com> In-Reply-To: <20140915230427.2486.29437@wrigleys.postgresql.org> References: <20140915230427.2486.29437@wrigleys.postgresql.org> Subject: =?UTF-8?Q?Re:_BUG_#11431:_Failing_to_backup_and_restore_a_Wind?= =?UTF-8?Q?ows_postgres_database,_with_Norwegian_Bokm=C3=A5l_locale.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Pg-Spam-Score: -0.1 (/) 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 The pg_dump file contains this command: CREATE DATABASE workgroup WITH TEMPLATE =3D template0 ENCODING =3D 'UTF8' LC_COLLATE =3D 'Norwegian (Bokm=C3=A5l)_Norway.1252' LC_CTYPE =3D 'Norwegian (Bokm=C3=A5l)_Norway.1252'; The UTF16 encoding for =C3=A5l) [a-ring l parenthesis] is 00e5 006c 0029 In UTF8 this set of characters encoded as: c3 a5 6c 29 The a-ring is converted to two bytes while the others are one.=20=20 Based on the ERROR: invalid byte sequence for encoding "UTF8": 0xe5 0x6c 0x29=20 It appears the set of characters is getting passed as: e5 6c 29 In UTF8, e5 is always the start of a three byte character,possibly pg_restore, ceratedb or else, tries to read these bytes as a single character.=20 However, 6c and 29 can only be single byte characters, they can't be the next two bytes in a three byte character. Hence the failure. Seems like in the code, the 00xe5 is converted to e5 instead of 'c3 a5' when passing the LC_COLLATE and LC_CTYPE values. -- View this message in context: http://postgresql.1045698.n5.nabble.com/BUG-1= 1431-Failing-to-backup-and-restore-a-Windows-postgres-database-with-Norwegi= an-Bokm-l-locale-tp5819260p5819745.html Sent from the PostgreSQL - bugs mailing list archive at Nabble.com. --=20 Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs