Fossil SCM

Incorrent handling of unicode encoded files (fossil on win XP).

Closed

f6bfac26484c826… · opened 17 years, 8 months ago

Type
Code_Defect
Priority
Immediate
Severity
Critical
Resolution
Not_A_Bug
Subsystem
one
Created
Aug. 5, 2008 9:28 p.m.

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.

Keyboard Shortcuts

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