mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-27 06:19:34 -06:00
cpp: Now supports BOM #1208
git-svn-id: svn://ultimatepp.org/upp/trunk@8772 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
0e212aa3a5
commit
ff94f771db
2 changed files with 9 additions and 3 deletions
|
|
@ -234,6 +234,13 @@ void Cpp::Do(const String& sourcefile, Stream& in, const String& currentfile, bo
|
|||
if(get_macros)
|
||||
return;
|
||||
|
||||
if(in.Peek() == 0xef) { // Skip UTF-8 BOM
|
||||
int64 pos = in.GetPos();
|
||||
in.Get();
|
||||
if(in.Get() != 0xbb || in.Get() != 0xbf)
|
||||
in.Seek(pos); // Was not UTF-8 BOM after all
|
||||
}
|
||||
|
||||
LTIMING("Expand");
|
||||
incomment = false;
|
||||
prefix_macro.Clear();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue