http://llvm.org/bugs/show_bug.cgi?id=8645
Summary: Incorrect UTF-8 BOM while detecting unsupported
encoding file
Product: clang
Version: 2.8
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
llvm-2.8\tools\clang\lib\Basic\SourceManager.cpp
@Line 131
//------------------------------------------------------
if (!isBufferInvalid()) {
llvm::StringRef BufStr = Buffer.getPointer()->getBuffer();
const char *BOM = 0;
if (BufStr.startswith("\xFE\xBB\xBF"))
^^^
BOM = "UTF-8";
else if (BufStr.startswith("\xFE\xFF"))
BOM = "UTF-16 (BE)";
else if (BufStr.startswith("\xFF\xFE"))
BOM = "UTF-16 (LE)";
//-----------------------------------------------------
the correct BOM should be "\xEF\xBB\xBF"
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs