[buildd-tools-devel] [PATCH] Output the contents of debian/files w/o a box
Wookey
wookey at wookware.org
Wed Jan 25 13:45:57 UTC 2012
+++ Roger Leigh [2012-01-25 13:07 +0000]:
> On Wed, Jan 25, 2012 at 01:57:01PM +0100, Max Thoursie wrote:
> > In addition to the above reasons, I didn't like the box since it
> > looked awful in the html-report I got it in. (The report generator
> > didn't handle the line drawing characters very well).
>
> OK. Does it also dislike the use of these as section separators
> as well?
I just came cross this sort of problem yesterday.
If you upload a pile of logs to a plain apache auto-indexed dir then
they just get delivered as text. And the user sees them rendered with
the default charset of their browser. Even on my nice uptodate machine
that seems to be ISO8859 so all the box chars come out as very long
horrid lines as they are UFT8-encoded.
This can be fixed if the server allows .htaccess, or you have control
of the server config. by adding AddDefaultCharset UTF-8 to the
.htaccess/directory config.
If you don't have either of those options then it's a mess, and you
have to wrap the file in <html><head><meta
charset...></head><body><pre> tags.
I'm not sure what one can do about this. Exactly how the line chars
get encoded in the output is presumably a function of the locale
config on the generating machine? Nothing guarantees that'll be the
same as the person machine viewing the files over http. And their are
various options to deal with it as above.
Sadly there is no general way of marking a text file up with its
encoding.
I guess having the option to just put out plain ------ or ======
header markers might be useful if you know the low-tech version would
cause less pain? Or to specify ISO8859/UTF8 output variants?
I do find the boxes useful for parsing log files, where otherwise
finding sections in a huge log is a pain, so don't want to imply they
should be got rid of. This is just an example I happened to find where
they reduced readability rather than enhanced it.
Wookey
--
Principal hats: Linaro, Emdebian, Wookware, Balloonboard, ARM
http://wookware.org/
More information about the Buildd-tools-devel
mailing list