diff options
author | bar@bar.myoffice.izhnet.ru <> | 2007-10-24 10:49:46 +0500 |
---|---|---|
committer | bar@bar.myoffice.izhnet.ru <> | 2007-10-24 10:49:46 +0500 |
commit | 811e64de6236e4f0ddf571c6c49517a473a18fc6 (patch) | |
tree | f6aa35c19f9376a046bae6703dc4a975d52b4263 /client | |
parent | 9732efe7f8970626840cf64628ab75f83eee5523 (diff) | |
parent | afdc9e8200e45eace23de652e171ea8ab32a7041 (diff) | |
download | mariadb-git-811e64de6236e4f0ddf571c6c49517a473a18fc6.tar.gz |
Merge mysql.com:/home/bar/mysql-work/mysql-5.0
into mysql.com:/home/bar/mysql-work/mysql-5.0-rpl-mr
Diffstat (limited to 'client')
-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 aa34c69b945..5b1470141e5 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -1047,6 +1047,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; |