From: Lea Wiemann <lewiemann@gmail.com>
To: Jan Engelhardt <jengelh@medozas.de>
Cc: git@vger.kernel.org
Subject: Re: gitweb forgets to send utf8 header for raw blob views
Date: Thu, 29 May 2008 13:32:56 +0200 [thread overview]
Message-ID: <483E9468.1090300@gmail.com> (raw)
In-Reply-To: <alpine.LNX.1.10.0805282002510.19264@fbirervta.pbzchgretzou.qr>
Jan Engelhardt wrote:
> [utf8 does not work] for raw blob views like
> http://dev.medozas.de/gitweb.cgi?p=hxtools;a=blob_plain;f=bin/git-forest;hb=HEAD
Gitweb should probably not be recoding blobs, so the best I can think of
is check for UTF-8 validity and add charset=utf-8 in that case (and in
other cases leave the charset undeclared).
The drawback with that is that we cannot send plain blobs without
reading them into memory (or reading them twice), since we have to check
for UTF-8 validity of the whole blob before sending it. (Gitweb is
currently reading the whole blob into memory, but that's unnecessary and
could be changed in the future.)
After my next refactoring, there *might* be some chance to easily
implement something like "if it's smaller than x KB (e.g. 512), read it
into memory, check for valid UTF-8 and optionally add charset=utf-8,
otherwise don't read it into memory and send it without charset=utf-8
[or perhaps check for BOM presence at the beginning]." I'll remember
if/when it comes up in my refactoring and get back to the mailing list
about it.
-- Lea
next prev parent reply other threads:[~2008-05-29 11:33 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-28 18:04 gitweb forgets to send utf8 header for raw blob views Jan Engelhardt
2008-05-29 11:32 ` Lea Wiemann [this message]
2008-05-30 8:18 ` Jakub Narebski
2008-05-31 11:27 ` [PATCH] gitweb: Add charset info to "raw" blob output Jakub Narebski
2008-05-31 18:22 ` Junio C Hamano
2008-06-01 11:06 ` Jakub Narebski
2008-06-01 12:15 ` Jan Engelhardt
2008-06-01 12:16 ` Jan Engelhardt
2008-06-03 14:47 ` [PATCH v2] gitweb: Add charset info to "raw" output of 'text/plain' blobs Jakub Narebski
2008-05-31 15:04 ` gitweb forgets to send utf8 header for raw blob views Jan Engelhardt
2008-05-31 22:39 ` Jakub Narebski
2008-06-01 2:08 ` Jan Engelhardt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=483E9468.1090300@gmail.com \
--to=lewiemann@gmail.com \
--cc=git@vger.kernel.org \
--cc=jengelh@medozas.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).