Fossil SCM

Add detection of binary data with no leading UTF-16 byte-order-mark.

mistachkin 2012-11-01 20:19 UTC commitWarningV2
Commit 7d3a06b89a3998299d04a5fed7779f5583fd65b1
1 file changed +1 -1
+1 -1
--- src/checkin.c
+++ src/checkin.c
@@ -895,11 +895,11 @@
895895
static int allOk = 0; /* Set to true to disable this routine */
896896
897897
if( allOk ) return;
898898
fUnicode = starts_with_utf16_bom(p);
899899
eType = fUnicode ? looks_like_utf16(p) : looks_like_utf8(p);
900
- if( eType==-1 || fUnicode ){
900
+ if( eType==0 || eType==-1 || fUnicode ){
901901
const char *zWarning;
902902
Blob ans;
903903
char cReply;
904904
905905
if( eType==-1 && fUnicode ){
906906
--- src/checkin.c
+++ src/checkin.c
@@ -895,11 +895,11 @@
895 static int allOk = 0; /* Set to true to disable this routine */
896
897 if( allOk ) return;
898 fUnicode = starts_with_utf16_bom(p);
899 eType = fUnicode ? looks_like_utf16(p) : looks_like_utf8(p);
900 if( eType==-1 || fUnicode ){
901 const char *zWarning;
902 Blob ans;
903 char cReply;
904
905 if( eType==-1 && fUnicode ){
906
--- src/checkin.c
+++ src/checkin.c
@@ -895,11 +895,11 @@
895 static int allOk = 0; /* Set to true to disable this routine */
896
897 if( allOk ) return;
898 fUnicode = starts_with_utf16_bom(p);
899 eType = fUnicode ? looks_like_utf16(p) : looks_like_utf8(p);
900 if( eType==0 || eType==-1 || fUnicode ){
901 const char *zWarning;
902 Blob ans;
903 char cReply;
904
905 if( eType==-1 && fUnicode ){
906

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button