Fossil SCM

Handle utf16 text pages in the /doc webpage.

drh 2014-01-14 13:39 trunk
Commit 1c5b51e6bf1706f2778c6a4e6f6f19d671b32359
+1
--- src/doc.c
+++ src/doc.c
@@ -483,10 +483,11 @@
483483
if( content_get(rid, &filebody)==0 ){
484484
goto doc_not_found;
485485
}
486486
db_end_transaction(0);
487487
}
488
+ blob_to_utf8_no_bom(&filebody, 0);
488489
489490
/* The file is now contained in the filebody blob. Deliver the
490491
** file to the user
491492
*/
492493
zMime = P("mimetype");
493494
494495
ADDED test/utf16le.txt
--- src/doc.c
+++ src/doc.c
@@ -483,10 +483,11 @@
483 if( content_get(rid, &filebody)==0 ){
484 goto doc_not_found;
485 }
486 db_end_transaction(0);
487 }
 
488
489 /* The file is now contained in the filebody blob. Deliver the
490 ** file to the user
491 */
492 zMime = P("mimetype");
493
494 DDED test/utf16le.txt
--- src/doc.c
+++ src/doc.c
@@ -483,10 +483,11 @@
483 if( content_get(rid, &filebody)==0 ){
484 goto doc_not_found;
485 }
486 db_end_transaction(0);
487 }
488 blob_to_utf8_no_bom(&filebody, 0);
489
490 /* The file is now contained in the filebody blob. Deliver the
491 ** file to the user
492 */
493 zMime = P("mimetype");
494
495 DDED test/utf16le.txt

Binary file

Keyboard Shortcuts

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