diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2019-11-25 20:30:25 (GMT) |
---|---|---|
committer | Dimitri van Heesch <doxygen@gmail.com> | 2019-11-25 20:30:25 (GMT) |
commit | 08a10bd651bdaf0c20d3277561d169f30b86b1cf (patch) | |
tree | fd926b0f969df1f06984879162319ea2d5cb1bb9 /src | |
parent | dbd8ceb8efa2e7b413780a43e74b30f039670a72 (diff) | |
parent | dc20493b3351d79024f2f808d16f47a502346606 (diff) | |
download | Doxygen-08a10bd651bdaf0c20d3277561d169f30b86b1cf.zip Doxygen-08a10bd651bdaf0c20d3277561d169f30b86b1cf.tar.gz Doxygen-08a10bd651bdaf0c20d3277561d169f30b86b1cf.tar.bz2 |
Merge branch 'master' of github.com:doxygen/doxygen
Diffstat (limited to 'src')
-rw-r--r-- | src/util.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/util.cpp b/src/util.cpp index f58a630..5868b62 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -8033,13 +8033,18 @@ bool readInputFile(const char *fileName,BufStr &inBuf,bool filter,bool isSourceC int start=0; if (size>=2 && - (((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 + ((uchar)inBuf.at(0)==0xFF && (uchar)inBuf.at(1)==0xFE) // Little endian BOM + ) // UCS-2LE encoded file + { + transcodeCharacterBuffer(fileName,inBuf,inBuf.curPos(), + "UCS-2LE","UTF-8"); + } + else if (size>=2 && + ((uchar)inBuf.at(0)==0xFE && (uchar)inBuf.at(1)==0xFF) // big endian BOM + ) // UCS-2BE encoded file { transcodeCharacterBuffer(fileName,inBuf,inBuf.curPos(), - "UCS-2","UTF-8"); + "UCS-2BE","UTF-8"); } else if (size>=3 && (uchar)inBuf.at(0)==0xEF && |