Mantis - Squeak
Viewing Issue Advanced Details
5996 Monticello major sometimes 02-10-07 15:22 10-03-09 19:34
umejava  
andreas  
normal  
assigned 3.9  
open  
none    
none  
0005996: Monticello sometimes produces broken mcz file
Monticello sometimes creates bad CRC mcz file in non-ascii environment. The problem seems to be in handling of WideString. This patch ensures that any source strings in mcz file will be properly encoded as UTF-8.
 MonM17nPatch-mu.1.1.cs [^] (1,012 bytes) 02-10-07 15:23
 TestPkg.st [^] (485 bytes) 02-10-07 15:41
 TestPkg-mu.1.mcz [^] (1,334 bytes) 02-10-07 15:42
 Monticello-m17n-patch.8.cs [^] (3,474 bytes) 01-23-08 11:12
 Monticello-m17n-patch.20.cs [^] (4,099 bytes) 02-02-08 06:23

Notes
(0009616)
umejava   
02-10-07 15:47   
TestPkg.st ... a sample source file for reproducing the problem.
TestPkg-mu.1.mcz ... a broken MCZ created by Monticello before this patch.
(0011709)
umejava   
01-23-08 11:12   
Monticello-m17n-patch.8.cs for Squeak 3.9+
(0011730)
umejava   
02-02-08 06:36   
Monticello-m17n-patch.20.cs is an attempt to keep backward compatibility with old (non-patched) MCZ readers. If MCZ tag-info string has only ascii characters, the string will be written as MacRoman. (.st source code is always written as UTF-8 with BOM). It is not an ideal solution (personally I think any string should be out as UTF-8). But keeping the compatibility is important especially if you would like to work with (non-patched) systems (for example SqueakSource).
(0012277)
Keith_Hodges   
06-08-08 23:38   
Before I add this to Monticello will this patch work in 3.7/3.8?
(0012286)
umejava   
06-09-08 01:14   
Before 3.9, Squeak source file output format does not contain BOM. (UTF8 without BOM was used for WideString source.) So the patch (Monticello-m17n-patch.20.cs) is especially written for 3.9 or 3.10.
(0012751)
Keith_Hodges   
10-26-08 02:09   
But can the patch be included in Monticello which is used by 3.7 and 3.8 users?
(0012754)
umejava   
10-26-08 03:25   
At least for 3.8 final, I confirmed that it works. For 3.7, it will not work, because MultiByteFileStream>>setConverterForCode is not implemented.