On Thu, Nov 5, 2015 at 12:16 PM, Jan Nijtmans <[email protected]>
wrote:

> 2015-11-05 19:37 GMT+01:00  <[email protected]>:
> > Hi,
> > I am also trapped with this binary file detection for the egregious use
> of
> > ascii characters 2 and 6 in my code. :(
> >
> > ;//  ascii2+sometexthere+ascii6
> > ;//    sometexthere ;<-- pasting here does not show the prefix and suffix
> > ascii characters.
>
> As far as I know, fossil doesn't use control characters to decide
> the file is binary, only the null-byte. So I think something else
> is triggering the binary detection. Too long lines, maybe?
>

Fossil has in the past definitely considered control codes as binary (other
than tab, cr, lf, maybe a couple others).

If you are dealing with C or C++ source code (and I suspect others), those
"bad" control codes are not part of the official source code character set
defined by the standard. Even if they were officially allowed, how should
they be rendered in the user interface? They are non-printing characters by
definition.

Just out of curiosity, why does the OP not want to use escape sequences
which have well defined behavior for both of the above languages and well
defined semantics for printing on a display?

Note: C & C++ technically do not include the characters $ and @ in their
basic source character set. They are typically allowed in source (in
character or string literals) because the standard also requires the
environment to document how they map source characters to the basic source
character set, and practically most compilers treat source as an 8 bit
stream of characters, so all bytes are valid characters under the "how are
they mapped" proviso.

Still, it is awkward to determine how one should render characters like
ASCII STX and ACK, particularly by a web browser based environment that
does not define a rendering for character codes less than 32 (none of
ASCII, ISO-8859, or Unicode have a glyph to represent those). Certainly
fossil could come up with some sort of quoting escape mechanism to show
such characters, but it would be non-standard by definition.

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

Reply via email to