Fossil

Check-in [3ff5ca05]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Change the encoding on the ZIP archive generator so that it preserves UTF8 filenames.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:3ff5ca0573fce22007ad190835e755f90b74238a
User & Date: drh 2012-12-04 00:17:21
References
2012-12-04
03:49 Ticket [838bde79] file extracted from Fossil zip archive could have different name status still Review with 3 other changes artifact: 51bcb3dd user: anonymous
Context
2012-12-04
01:10
The "ln" query parameter causes lines numbers to be shown on the "annotate" webpage. check-in: 08f4eda7 user: drh tags: trunk
00:17
Change the encoding on the ZIP archive generator so that it preserves UTF8 filenames. check-in: 3ff5ca05 user: drh tags: trunk
2012-12-03
22:03
Set bit 11 in the "general purpose bit flag" to 1. This indicates (according to the pkware documentation) that all filenames are in utf-8, in stead of IBM-437. This should fix ticket [838bde7990d8e190957cbfe7f15c77322dc54e57] Closed-Leaf check-in: ceb11b07 user: jan.nijtmans tags: utf8-in-zip
20:48
missing parameter type check-in: ee1ff73a user: jan.nijtmans tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/zip.c.

150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
...
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
    iMethod = 0;
    iMode = 040755;
  }
  nameLen = strlen(zName);
  memset(zHdr, 0, sizeof(zHdr));
  put32(&zHdr[0], 0x04034b50);
  put16(&zHdr[4], 0x000a);
  put16(&zHdr[6], 0);
  put16(&zHdr[8], iMethod);
  put16(&zHdr[10], dosTime);
  put16(&zHdr[12], dosDate);
  put16(&zHdr[26], nameLen);
  put16(&zHdr[28], 13);
  
  put16(&zExTime[0], 0x5455);
................................................................................
  
  /* Make an entry in the tables of contents
  */
  memset(zBuf, 0, sizeof(zBuf));
  put32(&zBuf[0], 0x02014b50);
  put16(&zBuf[4], 0x0317);
  put16(&zBuf[6], 0x000a);
  put16(&zBuf[8], 0);
  put16(&zBuf[10], iMethod);
  put16(&zBuf[12], dosTime);
  put16(&zBuf[14], dosDate);
  put32(&zBuf[16], iCRC);
  put32(&zBuf[20], nByteCompr);
  put32(&zBuf[24], nByte);
  put16(&zBuf[28], nameLen);







|







 







|







150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
...
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
    iMethod = 0;
    iMode = 040755;
  }
  nameLen = strlen(zName);
  memset(zHdr, 0, sizeof(zHdr));
  put32(&zHdr[0], 0x04034b50);
  put16(&zHdr[4], 0x000a);
  put16(&zHdr[6], 0x0800);
  put16(&zHdr[8], iMethod);
  put16(&zHdr[10], dosTime);
  put16(&zHdr[12], dosDate);
  put16(&zHdr[26], nameLen);
  put16(&zHdr[28], 13);
  
  put16(&zExTime[0], 0x5455);
................................................................................
  
  /* Make an entry in the tables of contents
  */
  memset(zBuf, 0, sizeof(zBuf));
  put32(&zBuf[0], 0x02014b50);
  put16(&zBuf[4], 0x0317);
  put16(&zBuf[6], 0x000a);
  put16(&zBuf[8], 0x0800);
  put16(&zBuf[10], iMethod);
  put16(&zBuf[12], dosTime);
  put16(&zBuf[14], dosDate);
  put32(&zBuf[16], iCRC);
  put32(&zBuf[20], nByteCompr);
  put32(&zBuf[24], nByte);
  put16(&zBuf[28], nameLen);