On 13/10/15 10:04, Chang Chao wrote:
Hi Chang!
Based on
http://www.postgresql.org/message-id/4678.1438350389@sss.pgh.pa.us, what I'd say is that the best thing to do should be to send *in the startup message*:
- client_encoding: desired client encoding
- lc_messages: C
and encode the startup message in US_ASCII (lowest common denominator). And of course switch the encoding of further messages if server replies (ParameterStatus) with a different encoding (which should happen if we sent in StartupMessage a different encoding request).
Hope this helps. Cheers,
Álvaro
--
Álvaro Hernández Tortosa
-----------
8Kdata