View Ticket
Not logged in
Ticket UUID: f6bfac26484c826b8fdd33f9d93149a7279986da
Title: Incorrent handling of unicode encoded files (fossil on win XP).
Status: Closed Type: Code_Defect
Severity: Critical Priority: Immediate
Subsystem: one Resolution: Not_A_Bug
Last Modified: 2008-08-05 22:21:58
Version Found In: all
Description & Comments:
While trying ro add file encoded in unicode (regardless of FEFF or FFFE byte order) fossil reports, that file was added, but while displaying such files with artifact view(artifact), it shows only first 2 or 3 bytes of file.

drh added on 2008-08-05 22:21:58:
Fossil stores all files as binary data. There are never any encoding changes or attempts to interpret or translate text. This is by design.

When displaying a file using the web interface, fossil assumes a UTF-8 encoding. Fossil does not record any mimetype information so there is nothing else it can do. If you try to display a GIF file that using the web interface it will also come out looking funky when it tries to interpret the binary GIF file as UTF-8.

I suppose the artifact viewer in the web interface could look at the file and try to make some guess at its mimetype. But that is an advanced capabiity. I'm not sure we really want to go there.

For now, let's just say that if you want to look at the file using the web interface, then the file needs to be UTF8. If you want to look at non-UTF8 files, the check them out (thus getting an exact replicate of the original file) and view them using an appropriate viewer for that file.