PQescapebytea() is not multibyte aware and will produce bad multibyte character sequences. Example:
INSERT INTO t1(bytea_col) VALUES('characters produced by PQescapebytea'); ERROR: Invalid EUC_JP character sequence found (0x8950) I think 0x89 should be converted to '\\211' since 0x89 of 0x8950 is considered as "non printable characters". Any objection? -- Tatsuo Ishii ---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives? http://archives.postgresql.org