Yes, the Encoding might be the source of the problem, once initialized the cluster with WINDOWS1252 as following:
initdb.exe -D c:/test/pgsql/data -E WINDOWS1252
--locale="Norwegian (Bokmål)_Norway.1252" -A trust -U pgadmin
pg_ctl -D "c:/test/pgsql/data" -l
c:/test/bokmalLocalenblocalePG.log start
The cluster created with these settings:
ENCODING = 'WIN1252'
TABLESPACE = pg_default
LC_COLLATE = 'Norwegian (Bokmål)_Norway.1252'
LC_CTYPE = 'Norwegian (Bokmål)_Norway.1252'
Then pg_backup will create a proper pg_dump file, that can be restored into database with a Norwegian (Bokmål)_Norway.1252 locale.
Thank you,
Alon
From: John R Pierce [via PostgreSQL] [mailto:ml-node+[hidden email]]
Sent: Saturday, September 20, 2014 10:32 PM
To: Alon Siman Tov
Subject: Re: [BUGS] Re: BUG #11431: Failing to backup and restore a Windows postgres database, with Norwegian Bokmål locale.
On 9/20/2014 10:18 PM, Noah Misch wrote:
> On Fri, Sep 19, 2014 at 03:15:53PM -0700, Alon wrote:
>> >The pg_dump file contains this command:
>> >CREATE DATABASE workgroup WITH TEMPLATE = template0 ENCODING = 'UTF8'
>> >LC_COLLATE = 'Norwegian (Bokmål)_Norway.1252' LC_CTYPE = 'Norwegian
>> >(Bokmål)_Norway.1252';...
> In WIN1252, "e5 6c 29" is "ål)". We're likely failing to set client_encoding
> at some essential point in the process.
is it a problem that ENCODING=utf8 is being used with the collation and
char typing of Norwegian windows-1252 ?
--
john r pierce 37N 122W
somewhere on the middle of the left coast
--
Sent via pgsql-bugs mailing list ([hidden email])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
To unsubscribe from BUG #11431: Failing to backup and restore a Windows postgres database, with Norwegian Bokmål locale., click here.
NAML