diff options
author | mkindahl@dl145h.mysql.com <> | 2007-11-21 21:11:57 +0100 |
---|---|---|
committer | mkindahl@dl145h.mysql.com <> | 2007-11-21 21:11:57 +0100 |
commit | 3cf2733086e5c655632541495ffdab3e20000c6f (patch) | |
tree | d6d276ce156d5e7b36b11418a634339486f9c098 /client/mysql.cc | |
parent | 9d8981033d54bb55528d842beb524f3d1e5f1fdd (diff) | |
parent | 379b67b9678eb4887d6fb2e4035b3ad4d3982cac (diff) | |
download | mariadb-git-3cf2733086e5c655632541495ffdab3e20000c6f.tar.gz |
Merge dl145h.mysql.com:/data0/mkindahl/mysql-5.0
into dl145h.mysql.com:/data0/mkindahl/mysql-5.0-rpl-merge
Diffstat (limited to 'client/mysql.cc')
-rw-r--r-- | client/mysql.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/client/mysql.cc b/client/mysql.cc index 76ed10d9481..2162e4bc25e 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -1052,6 +1052,17 @@ static int read_and_execute(bool interactive) if (!interactive) { line=batch_readline(status.line_buff); + /* + Skip UTF8 Byte Order Marker (BOM) 0xEFBBBF. + Editors like "notepad" put this marker in + the very beginning of a text file when + you save the file using "Unicode UTF-8" format. + */ + if (!line_number && + (uchar) line[0] == 0xEF && + (uchar) line[1] == 0xBB && + (uchar) line[2] == 0xBF) + line+= 3; line_number++; if (!glob_buffer.length()) status.query_start_line=line_number; |