View Ticket
Not logged in
Ticket UUID: ba7e79b248640ce30507e89537d203a2d9125214
Title: problem showing diff view with several files, each in different encoding.
Status: Closed Type: Code_Defect
Severity: Critical Priority: Immediate
Subsystem: one Resolution: Rejected
Last Modified: 2008-08-05 22:26:24
Version Found In: all
Description & Comments:
While using diff view(vdiff) with several differently encoded files (windows codepage, UTF-8, UTF with BOM, UCS2 Big Endian,UCS2 Little Endian ) added with one commit, fossil shows correctly mostly one file only (depends on character encoding used to view fossil generated diff web page)

drh added on 2008-08-05 22:26:24:
The "diff"-er built into fossil assumes files to be diffed are UTF-8 text.

I do not think it is desirable to have fossil trying to guess at file encodings and process files differently based on its best guess of the encoding. What if it guesses wrong? Better to always assume UTF-8 text.

For the command-line interface, you can specify an alternative "diff" program to use in place of the built-in differ using the "fossil setting" command. You can specify both a shell-diff and a graphical-diff. So if you want the ability to diff files with different encodings, all you have to do is specify and external program that has that capability.

I suppose it might be possible to enhance the web interface to use an external program that can diff files with different encodings. But I really do not want to go there at this time. Better to require files to be UTF-8.