Re: Bug with PATHs having non-ASCII characters

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Bug with PATHs having non-ASCII characters
Дата
Msg-id 20100107180041.GF4315@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: Bug with PATHs having non-ASCII characters  (Magnus Hagander <magnus@hagander.net>)
Список pgsql-hackers
Magnus Hagander wrote:
> On Thu, Jan 7, 2010 at 02:37, Takahiro Itagaki
> <itagaki.takahiro@oss.ntt.co.jp> wrote:

> > I have a Windows-specific patch for open(), attached for reference.
> > But we need to consider about other issues:
> >
> >  - We need to consider about not only only open(), but also opendir(),
> >    stat() and symlink().
> >
> >  - An entirely-different fix is needed for non-Windows platforms.
> >    Probably we will convert encodings from GetDatabaseEncoding() to
> >    GetPlatformEncoding() in MBCS, but this is not needed on Windows.
> >    We should consider avoiding random ifdef blocks for the switching.
> 
> Shouldn't we develop this with "multi-platform" in mind from the
> start, instead of doing a Windows specific patch? It may be that we
> end up with two completely different codepaths, but more likely we can
> share some of it between them?

I'm not sure there's a lot you can do in platforms other than Windows.
On Windows the filenames are all Unicode and you know you can get them
using UTF16.  On other platforms it could be anything, and it is
certainly not server_encoding; even different filesystems can use
different encodings.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Greg Sabino Mullane"
Дата:
Сообщение: Re: Streaming replication and postmaster signaling
Следующее
От: "Kevin Grittner"
Дата:
Сообщение: Re: Serializable Isolation without blocking