Fossil

View Ticket
Login
2011-06-29
11:21 Fixed ticket [5982aa5064]: Malformed manifest error when committing non-ascii-named files plus 1 other change artifact: 22f6917e59 user: drh
11:20
Fix the fossil_strcmp() routine so that it compares strings in the correct order even if some of the characters have their high-order bits set. Ticket [5982aa506467d]. check-in: f23e90da8a user: drh tags: trunk
10:53 New ticket [5982aa5064] Malformed manifest error when committing non-ascii-named files. artifact: 7f0369ed8d user: anonymous

Ticket Hash: 5982aa506467d6acd1f426b10ce3eab14e7e79ac
Title: Malformed manifest error when committing non-ascii-named files
Status: Fixed Type: Code_Defect
Severity: Important Priority:
Subsystem: Resolution: Fixed
Last Modified: 2011-06-29 11:21:04
14.77 years ago
Created: 2011-06-29 10:53:29
14.77 years ago
Version Found In: [32ad9a1584]
Description:
Problem is actual since check-in [32ad9a1584] after closing ticket [3f0216560679fd41]. When using only ascii (ansi) names all's ok.

How to reproduce:

$ fossil new local.fossil
project-id: 6ebb7aa8bba00a717242424eb34e5210a90e3551
server-id:  1f0d2c5e79252d625ddd9db92be893702b4e394a
admin-user: flanker (initial password is "******")
$ fossil open local.fossil
$ fossil add "Приложение 3.doc"
ADDED  Приложение 3.doc
$ fossil commit -m "test"
New_Version: d709fe4fa6e2e544ccdc170bce9ee7025273ce95
$ fossil add 123.txt 
ADDED  123.txt
$ fossil commit -m "test2"
New_Version: 8f10304d006b7c39d9ed422985a67604863a4290
fossil: manifest file (5) is malformed

The most sensitive change in this check-in was:

+int fossil_strcmp(const char *zA, const char *zB){
+  if( zA==0 ){
+    if( zB==0 ) return 0;
+    return -1;
+  }else if( zB==0 ){
+    return +1;
+  }else{
+    int a, b;
+    do{
+      a = *zA++;
+      b = *zB++;
+    }while( a==b && a!=0 );
+    return a - b;
   }
 }

Author said that this function can compare strings without considering locale. Maybe problem is here.