Re: SQL literal with SJIS hankaku-kana character cause missing escape

"Inoue, Hiroshi" <[email protected]>
Newsgroups gmane.comp.db.postgresql.odbc
Message-ID <[email protected]>
Hi Takatsuka-san,

How about an attached patch?

regards,
Hiroshi Inoue

On 2017/09/05 14:01, TAKATSUKA Haruka wrote:
> Hello, psqlODBC team.
>
> We got a bug.
> Its reproduce program and log are attached.
>
> An SQL string that contains string leteral ended odd number of
> SJIS hankaku-kana character could cause misssing the next escape.
>
> We haven't fixed it yet.
>
> best regards,
> Haruka Takatsuka / SRA OSS, Inc. http://www.sraoss.co.jp


-- 
Sent via pgsql-odbc mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc
ansi.patch (text/x-diff, 290 B)
diff --git a/multibyte.h b/multibyte.h
index 4a0fe7e..bae90ad 100644
--- a/multibyte.h
+++ b/multibyte.h
@@ -60,7 +60,7 @@ extern int pg_CS_code(const char *stat_string);
 typedef struct
 {
 	int	ccsc;
-	const char *encstr;
+	const UCHAR *encstr;
 	ssize_t	pos;
 	int	ccst;
 } encoded_str;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.