diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2018-08-10 12:20:52 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-10 12:20:52 (GMT) |
commit | c82abe1f23ec55aa1d05f118c2bae3aac3b68296 (patch) | |
tree | c8a179c5f994f9760b23de4334784e0286251ed4 /src/util.cpp | |
parent | 69829b043fb36a56d194dc31522b694379636855 (diff) | |
parent | f3b423989086728ded99492e61a0a5c127f21f69 (diff) | |
download | Doxygen-c82abe1f23ec55aa1d05f118c2bae3aac3b68296.zip Doxygen-c82abe1f23ec55aa1d05f118c2bae3aac3b68296.tar.gz Doxygen-c82abe1f23ec55aa1d05f118c2bae3aac3b68296.tar.bz2 |
Merge pull request #6437 from albert-github/feature/bug_ucs_2
Automatic detection of UCS-2 based on BOM corrected
Diffstat (limited to 'src/util.cpp')
-rw-r--r-- | src/util.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/util.cpp b/src/util.cpp index 6c7e3d5..b387a84 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -7949,8 +7949,8 @@ bool readInputFile(const char *fileName,BufStr &inBuf,bool filter,bool isSourceC int start=0; if (size>=2 && - ((inBuf.at(0)==-1 && inBuf.at(1)==-2) || // Little endian BOM - (inBuf.at(0)==-2 && inBuf.at(1)==-1) // big endian BOM + (((uchar)inBuf.at(0)==0xFF && (uchar)inBuf.at(1)==0xFE) || // Little endian BOM + ((uchar)inBuf.at(0)==0xFE && (uchar)inBuf.at(1)==0xFF) // big endian BOM ) ) // UCS-2 encoded file { |