Skip to content
This repository was archived by the owner on Sep 2, 2021. It is now read-only.

Commit b7bf72b

Browse files
committed
Merge pull request #438 from adobe/jeff/win_utf16_fix
UTF16/32 files now require a BOM
2 parents 1a7bf4f + 165c901 commit b7bf72b

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

appshell/appshell_extensions_win.cpp

+1-5
Original file line numberDiff line numberDiff line change
@@ -757,12 +757,8 @@ bool hasUTF16_32(UTFValidationState& validationState)
757757

758758
// Check to see if buffer is UTF-16 or UTF-32 with or without a BOM
759759
BOOL test = IsTextUnicode(validationState.data, validationState.dataLen, &flags);
760-
// The check for IsTextUnicode could return FALSE but some bits turned on in the
761-
// flags result when statstical analysis is applied. treat those as UTF16 / UTF32
762-
// since we are only looking for UTF8 data which always fails with flags == 0
763-
bool result = ((test != FALSE) || (flags > 0));
764760

765-
validationState.utf1632 = (result ? CS_YES : CS_NO);
761+
validationState.utf1632 = (test ? CS_YES : CS_NO);
766762
}
767763

768764
return (validationState.utf1632 == CS_YES);

0 commit comments

Comments
 (0)