From 115ce234af4aa7f6efc7c1725da107a288b916c0 Mon Sep 17 00:00:00 2001 From: Hiroshi Inoue Date: Sun, 21 Oct 2018 08:38:02 +0900 Subject: [PATCH] Ignore BOM(byte order mark)s when there are BOMs in the input lines of test/reset-db. --- test/reset-db.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/reset-db.c b/test/reset-db.c index cd58726..80946c8 100644 --- a/test/reset-db.c +++ b/test/reset-db.c @@ -64,6 +64,13 @@ run_statement(char *statement) SQLSMALLINT textlen; char sqlstate[20]; + /* + * Ignore BOM of UTF-8 + */ + if ((UCHAR) statement[0] == 0xEF && + (UCHAR) statement[1] == 0xBB && + (UCHAR) statement[2] == 0xBF) + statement += 3; /* * Skip empty lines. The server would just ignore them too, but might as * well avoid the round-trip. -- 2.39.5