Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XML宣言を用いた文字コード判別処理を強化する #1422

Merged
merged 15 commits into from Oct 11, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
AutoDetect系関数における判定処理を統一する
  • Loading branch information
Kohki Akikaze committed Oct 6, 2020
commit d3d8a4d20ca864d7367d225713882b4f75ece71c
9 changes: 1 addition & 8 deletions sakura_core/charset/CESI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1164,14 +1164,7 @@ ECodeType CESI::AutoDetectByCoding( const char* pBuf, int nSize )
if( nBegin == i ){
return CODE_NONE;
}
int k;
for( k = 0; k < _countof(encodingNameToCode); k++ ){
const int nLen = encodingNameToCode[k].nLen;
if( i - nBegin == nLen
&& 0 == _memicmp( encodingNameToCode[k].name, pBuf + nBegin, nLen ) ){
return static_cast<ECodeType>(encodingNameToCode[k].nCode);
}
}
return MatchEncoding( pBuf + nBegin, i - nBegin );
}else if( '\r' == pBuf[i] || '\n' == pBuf[i] ){
if( '\r' == pBuf[i] && '\n' == pBuf[i+1] ){
i++;
Expand Down