diff options
author | John Wiegley <johnw@newartisans.com> | 2019-08-18 12:45:50 -0700 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2019-08-18 12:45:50 -0700 |
commit | 4c0c4c5a1c55d7d343e30d06ff5afc0ebf9ef0fd (patch) | |
tree | 8992de2a3f14722f04cce52db00d8abd08720420 /src/textual.cc | |
parent | 676456b9fef0c533357707e722e112f766788394 (diff) | |
download | fork-ledger-4c0c4c5a1c55d7d343e30d06ff5afc0ebf9ef0fd.tar.gz fork-ledger-4c0c4c5a1c55d7d343e30d06ff5afc0ebf9ef0fd.tar.bz2 fork-ledger-4c0c4c5a1c55d7d343e30d06ff5afc0ebf9ef0fd.zip |
Switch from using utf8::is_bom to utf8::starts_with_bom
Fixes #1816
Diffstat (limited to 'src/textual.cc')
-rw-r--r-- | src/textual.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/textual.cc b/src/textual.cc index 258e2560..4e24fd44 100644 --- a/src/textual.cc +++ b/src/textual.cc @@ -319,7 +319,9 @@ std::streamsize instance_t::read_line(char *& line) context.curr_pos = context.line_beg_pos; context.curr_pos += len; - if (context.linenum == 0 && utf8::is_bom(context.linebuf)) { + if (context.linenum == 0 && + utf8::starts_with_bom( + context.linebuf, context.linebuf + sizeof(context.linebuf))) { line = &context.linebuf[3]; len -= 3; } else { |