pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Noah Misch <noah@leadboat.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Alon <asimantov@tableausoftware.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: Re: BUG #11431: Failing to backup and restore a Windows postgres database, with Norwegian Bokmål locale.
Date: Sun, 21 Sep 2014 14:04:13 -0400
Message-ID: <20140921180413.GA1585212@tornado.leadboat.com> (raw)
In-Reply-To: <7107.1411316005@sss.pgh.pa.us>
References: <20140915230427.2486.29437@wrigleys.postgresql.org>
	<1411164953375-5819745.post@n5.nabble.com>
	<20140921051846.GA1565935@tornado.leadboat.com>
	<7107.1411316005@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

On Sun, Sep 21, 2014 at 12:13:25PM -0400, Tom Lane wrote:
> Noah Misch <noah@leadboat.com> writes:
> > 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.
> 
> The level of stupidity needed to use non-ASCII characters in a locale name
> is breathtaking.  What were Microsoft thinking?

Windows Vista did deprecate that locale name style in favor of "nb-NO".
setlocale(LC_x, "") still returns the old style, though.  You need PostgreSQL
built with VS2012 or later to use "nb-NO" style; see IsoLocaleName().

> How are we supposed to
> guess what encoding applies when setting the encoding?

Windows functions with "char *" arguments where encoding matters typically
expect the argument to be in the Windows ANSI code page.


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (16+ messages)  latest in thread

Message-ID: <20140921180413.GA1585212@tornado.leadboat.com>
Permalink:  ../20140921180413.GA1585212@tornado.leadboat.com/
Also on:    postgresql.org/message-id/20140921180413.GA1585212@tornado.leadboat.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: noah@leadboat.com, tgl@sss.pgh.pa.us, asimantov@tableausoftware.com
  Subject: Re: BUG #11431: Failing to backup and restore a Windows postgres database, with Norwegian Bokmål locale.
  In-Reply-To: <20140921180413.GA1585212@tornado.leadboat.com>
  References: <20140915230427.2486.29437@wrigleys.postgresql.org> <1411164953375-5819745.post@n5.nabble.com> <20140921051846.GA1565935@tornado.leadboat.com> <7107.1411316005@sss.pgh.pa.us> <20140921180413.GA1585212@tornado.leadboat.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox