/*
 * call-seq:
 *    conn.client_encoding() => String
 * 
 * Returns the client encoding as a String.
 */
static VALUE
pgconn_client_encoding(obj)
  VALUE obj;
{
  char *encoding = (char *)pg_encoding_to_char(PQclientEncoding(get_pgconn(obj)));
  return rb_tainted_str_new2(encoding);
}