-
+
Localization>
- Using
libpq> functions.
- \encoding actually calls
- PQsetClientEncoding() for its purpose.
-
-
-int PQsetClientEncoding(PGconn *conn, const char *encoding);
-
-
- where conn is a connection to the server,
- and encoding is the encoding you
- want to use. If the function successfully sets the encoding, it returns 0,
- otherwise -1. The current encoding for this connection can be determined by
- using:
-
-
-int PQclientEncoding(const PGconn *conn);
-
-
- Note that it returns the encoding ID, not a symbolic string
- such as EUC_JP. To convert an encoding ID to an encoding name, you
- can use:
-
-
-char *pg_encoding_to_char(int encoding_id);
-
+
libpq> () has functions to control the client encoding.
-
+
+
+
+ PQclientEncoding
+
+
+
+
+
+ Returns the client encoding.
+
+ int PQclientEncoding(const PGconn *conn);
+
+
+ Note that it returns the encoding ID, not a symbolic string
+ such as EUC_JP. To convert an encoding ID to an encoding name, you
+ can use:
+
+
+char *pg_encoding_to_char(int encoding_id);
+
+
+
+
+
+
+
+ PQsetClientEncoding
+
+
+
+
+
+ Sets the client encoding.
+
+ int PQsetClientEncoding(PGconn *conn, const char *encoding);
+
+
+ conn is a connection to the server,
+ and encoding is the encoding you want to
+ use. If the function successfully sets the encoding, it returns 0,
+ otherwise -1. The current encoding for this connection can be
+ determined by using PQclientEncoding>.
+
+
+
+
PQsetErrorVerbosity