Re: Encoding for error messages during connect
От | Kris Jurka |
---|---|
Тема | Re: Encoding for error messages during connect |
Дата | |
Msg-id | 4EC4C620.3010809@ejurka.com обсуждение исходный текст |
Ответ на | Re: Encoding for error messages during connect (Thomas Kellerer <spam_eater@gmx.net>) |
Список | pgsql-jdbc |
On 11/17/2011 12:17 AM, Thomas Kellerer wrote: >> Now I don't think it would be possible for the driver to find out >> which encoding to use for that stream before actually having a >> connection. So it would need to evaluate some kind of client side >> information, e.g. the lc_messages environment variable on the client >> or through a connection property that would then be used to >> initialize the stream correctly. >> It's not a good assumption that the client environment will match the server environment. >> Personally I'd prefer a connection property (something like >> "messageEncoding") to control this as this can be part of the JDBC >> URL which is usually configurable in a Java environment. This seems more reasonable. Previously we discussed how to send usernames and passwords to the database because the encoding they are sent in must match the encoding of the database these values were set in (which may be different than the database you're connecting to). At the time we decided that a connection option to configure this wasn't the right idea and now always send these values as UTF-8. I don't recall why we made that decision, but checking the archives might provide some additional information on this case. Kris Jurka
В списке pgsql-jdbc по дате отправления: