On Fri, Sep 14, 2012 at 8:20 PM, Csaba Kos <[email protected]> wrote:

> I think now would be a good time to discuss the possibility of a more
> generic
> text conversion framework, i.e. not only UTF16 to UTF8 but also SHIFT-JIS
> to UTF8, and so on. Also CR+NL to NL conversion could be handled by such
> framework as well. One possibility is to support calling of an external
> command
> which could be specified in some "...-glob" setting.
>
> I'm not a git user, but as far as I know, git has a generic text
> filtering framework that is capable of the above.
>

One thing I thought of yesterday but dismissed (and am now rethinking as a
result of your email) is maybe there should be a bit of meta-data that can
be attached to files to explicitly set their encoding. Having built in
detection code would still be useful to set it initially, and having it as
meta-data could make it possible for the user to change the encoding of the
file when fossil guessed wrong for whatever reason. A similar bit of
functionality could be provided for end of line handling. Regardless, I am
a fossil novice myself, so maybe that functionality is there and I am just
ignorant of it.

Regardless, having some basic UTF-16 to UTF-8 conversion built in is
helpful in advancing the goal of providing base functionality that is
available on all platforms without need to install or configure extra
tools. It would certainly be cool to provide some sort of hook to access
external tools that could handle transcoding from more encodings as needed.
Maybe options to build with ICU (much as SQLite provides) could provide
what you're describing for those that want it, and in the case that ICU is
not available, built in diffing is limited to those base supported
encodings...

SDR
_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to