Fossil SCM
Add detection of binary data with no leading UTF-16 byte-order-mark.
Commit
7d3a06b89a3998299d04a5fed7779f5583fd65b1
Parent
c837e444450dec5…
1 file changed
+1
-1
+1
-1
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -895,11 +895,11 @@ | ||
| 895 | 895 | static int allOk = 0; /* Set to true to disable this routine */ |
| 896 | 896 | |
| 897 | 897 | if( allOk ) return; |
| 898 | 898 | fUnicode = starts_with_utf16_bom(p); |
| 899 | 899 | eType = fUnicode ? looks_like_utf16(p) : looks_like_utf8(p); |
| 900 | - if( eType==-1 || fUnicode ){ | |
| 900 | + if( eType==0 || eType==-1 || fUnicode ){ | |
| 901 | 901 | const char *zWarning; |
| 902 | 902 | Blob ans; |
| 903 | 903 | char cReply; |
| 904 | 904 | |
| 905 | 905 | if( eType==-1 && fUnicode ){ |
| 906 | 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==-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 |