Re: [HACKERS] character encoding in StartupMessage

2006-02-28 Thread Tom Lane
John DeSoi <[EMAIL PROTECTED]> writes: > On Feb 28, 2006, at 11:19 AM, Tom Lane wrote: > What about the pg_hba.conf file? Is there a provision to specify the > encoding or some other way to deal with non-ascii characters? pg_hba.conf is also processed without any locale considerations, ie, effec

Re: [HACKERS] character encoding in StartupMessage

2006-02-28 Thread John DeSoi
On Feb 28, 2006, at 11:19 AM, Tom Lane wrote: In any case I don't think there's a huge problem if we say that database and user names had better be chosen from the round-trip-safe subset. What about the pg_hba.conf file? Is there a provision to specify the encoding or some other way to de

Re: [HACKERS] character encoding in StartupMessage

2006-02-28 Thread Martijn van Oosterhout
On Tue, Feb 28, 2006 at 11:19:02AM -0500, Tom Lane wrote: > Martijn van Oosterhout writes: > >>> This may be the only solution. Converting everything to UTF-8 has > >>> issues because some encodings are not roundtrip-safe > > >> Is this still true? > > > I beleive so. If use the ICU Converter Ex

Re: [HACKERS] character encoding in StartupMessage

2006-02-28 Thread Magnus Hagander
> Martijn van Oosterhout writes: > >>> This may be the only solution. Converting everything to UTF-8 has > >>> issues because some encodings are not roundtrip-safe > > >> Is this still true? > > > I beleive so. If use the ICU Converter Explorer [1] to > examine some of > > the encodings we su

Re: [HACKERS] character encoding in StartupMessage

2006-02-28 Thread Tom Lane
Martijn van Oosterhout writes: >>> This may be the only solution. Converting everything to UTF-8 has >>> issues because some encodings are not roundtrip-safe >> Is this still true? > I beleive so. If use the ICU Converter Explorer [1] to examine some of > the encodings we support, they have "Con

Re: [HACKERS] character encoding in StartupMessage

2006-02-28 Thread Martijn van Oosterhout
On Tue, Feb 28, 2006 at 12:05:17PM -0300, Alvaro Herrera wrote: > Martijn van Oosterhout wrote: > > > This may be the only solution. Converting everything to UTF-8 has > > issues because some encodings are not roundtrip-safe (Enc -> UTF8 -> Enc > > gives you a different string than you started wit

Re: [HACKERS] character encoding in StartupMessage

2006-02-28 Thread Tom Lane
Martijn van Oosterhout writes: > However, my personal preference is to treat the name of the database as > a "bunch of bits" ie, don't consider it encoded at all. That's essentially what we are doing as far as the StartupMessage is concerned. Doesn't really solve the problem of post-startup acce

Re: [HACKERS] character encoding in StartupMessage

2006-02-28 Thread John DeSoi
On Feb 28, 2006, at 1:38 AM, Tom Lane wrote: I could not find anything in the Frontend/Backend protocol docs about character encoding in the StartupMessage. Assuming it is legal for a database or user name to have unicode characters, how is this handled when nothing yet has been said about

Re: [HACKERS] character encoding in StartupMessage

2006-02-28 Thread Alvaro Herrera
Martijn van Oosterhout wrote: > This may be the only solution. Converting everything to UTF-8 has > issues because some encodings are not roundtrip-safe (Enc -> UTF8 -> Enc > gives you a different string than you started with). There's probably > no encoding round-trip safe with every other encodi

Re: [HACKERS] character encoding in StartupMessage

2006-02-28 Thread Martijn van Oosterhout
On Tue, Feb 28, 2006 at 02:45:25PM +0800, Christopher Kings-Lynne wrote: > >I don't see any very nice solution at the moment. Once we get support > >for per-column locales, it might be possible to declare that the shared > >catalogs are always in UTF8 encoding and get the necessary > >conversions

Re: [HACKERS] character encoding in StartupMessage

2006-02-27 Thread Christopher Kings-Lynne
I don't see any very nice solution at the moment. Once we get support for per-column locales, it might be possible to declare that the shared catalogs are always in UTF8 encoding and get the necessary conversions to happen automatically. At the very least, could we always convert dbnames and s

Re: [HACKERS] character encoding in StartupMessage

2006-02-27 Thread Tom Lane
Christopher Kings-Lynne <[EMAIL PROTECTED]> writes: >> I could not find anything in the Frontend/Backend protocol docs about >> character encoding in the StartupMessage. Assuming it is legal for a >> database or user name to have unicode characters, how is this handled >> when nothing yet has be

Re: [HACKERS] character encoding in StartupMessage

2006-02-27 Thread Christopher Kings-Lynne
I could not find anything in the Frontend/Backend protocol docs about character encoding in the StartupMessage. Assuming it is legal for a database or user name to have unicode characters, how is this handled when nothing yet has been said about the client encoding? A similar badness is that i

[HACKERS] character encoding in StartupMessage

2006-02-27 Thread John DeSoi
I could not find anything in the Frontend/Backend protocol docs about character encoding in the StartupMessage. Assuming it is legal for a database or user name to have unicode characters, how is this handled when nothing yet has been said about the client encoding? Thanks, John DeSoi, Ph