Fossil SCM
Handle utf16 text pages in the /doc webpage.
Commit
1c5b51e6bf1706f2778c6a4e6f6f19d671b32359
Parent
5a66b6e7854f985…
2 files changed
+1
+1
| --- src/doc.c | ||
| +++ src/doc.c | ||
| @@ -483,10 +483,11 @@ | ||
| 483 | 483 | if( content_get(rid, &filebody)==0 ){ |
| 484 | 484 | goto doc_not_found; |
| 485 | 485 | } |
| 486 | 486 | db_end_transaction(0); |
| 487 | 487 | } |
| 488 | + blob_to_utf8_no_bom(&filebody, 0); | |
| 488 | 489 | |
| 489 | 490 | /* The file is now contained in the filebody blob. Deliver the |
| 490 | 491 | ** file to the user |
| 491 | 492 | */ |
| 492 | 493 | zMime = P("mimetype"); |
| 493 | 494 | |
| 494 | 495 | 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