Re: BUG #7493: Postmaster messages unreadable in a Windows console - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: BUG #7493: Postmaster messages unreadable in a Windows console
Date
Msg-id 511D14C1.1040100@gmx.net
Whole thread Raw
In response to Re: BUG #7493: Postmaster messages unreadable in a Windows console  (Greg Stark <stark@mit.edu>)
Responses Re: BUG #7493: Postmaster messages unreadable in a Windows console
List pgsql-hackers
On 2/11/13 10:22 PM, Greg Stark wrote:
> On Sun, Feb 10, 2013 at 11:47 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> If we knew that postgresql.conf was stored in, say, UTF8, then it would
>> probably be possible to perform encoding conversion to get string
>> variables into the database encoding.  Perhaps we should allow some
>> magic syntax to tell us the encoding of a config file?
>>
>>         file_encoding = 'utf8'  # must precede any non-ASCII in the file
> 
> If we're going to do that we might as well use the Emacs standard
> -*-coding: latin-1;-*-

Yes, or more generally perhaps what Python does:
http://docs.python.org/2.7/reference/lexical_analysis.html#encoding-declarations

(In Python 2, the default is ASCII, in Python 3, the default is UTF8.)

> But that said I'm not sure saying the whole file is in an encoding is
> the right approach. Paths are actually binary strings. any encoding is
> purely for display purposes anyways. Log line formats could be treated
> similarly if we choose.

Well, at some point someone is going to open a configuration file in an
editor, and the editor will usually only be table to deal with one
encoding per file.  So we need to make that work, even if technically,
different considerations apply to different settings.




pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: proposal or just idea for psql - show first N rows from relation backslash statement
Next
From: Tom Lane
Date:
Subject: Re: proposal or just idea for psql - show first N rows from relation backslash statement