/* * call-seq: * conn.set_client_encoding( encoding ) * * Sets the client encoding to the _encoding_ String. */ static VALUE pgconn_set_client_encoding(obj, str) VALUE obj, str; { Check_Type(str, T_STRING); if ((PQsetClientEncoding(get_pgconn(obj), STR2CSTR(str))) == -1){ rb_raise(rb_ePGError, "invalid encoding name %s",str); } return Qnil; }