Re: BUG #7493: Postmaster messages unreadable in a Windows console

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: BUG #7493: Postmaster messages unreadable in a Windows console
Дата
Msg-id 511D14C1.1040100@gmx.net
обсуждение исходный текст
Ответ на Re: BUG #7493: Postmaster messages unreadable in a Windows console  (Greg Stark <stark@mit.edu>)
Ответы Re: BUG #7493: Postmaster messages unreadable in a Windows console  (Craig Ringer <craig@2ndquadrant.com>)
Список 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 по дате отправления:

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: proposal or just idea for psql - show first N rows from relation backslash statement
Следующее
От: Tom Lane
Дата:
Сообщение: Re: proposal or just idea for psql - show first N rows from relation backslash statement