Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id BB4B6429E4E for ; Mon, 16 Jan 2012 05:18:36 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BlzCo79UXJyW for ; Mon, 16 Jan 2012 05:18:36 -0800 (PST) Received: from mail-gw3.nixu.fi (mail-gw3.nixu.fi [193.209.237.7]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id CD2D2429E4A for ; Mon, 16 Jan 2012 05:18:35 -0800 (PST) Received: from pps.filterd (mail-gw3 [127.0.0.1]) by mail-gw3.nixu.fi (8.14.4/8.14.4) with SMTP id q0GDHrvV018941; Mon, 16 Jan 2012 15:18:31 +0200 Received: from taco2.nixu.fi (taco2.nixu.fi [194.197.118.31]) by mail-gw3.nixu.fi with ESMTP id 114cs15q3r-1 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); Mon, 16 Jan 2012 15:18:30 +0200 Received: from taco2.nixu.fi (taco2.nixu.fi [194.197.118.31]) by taco2.nixu.fi (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id q0GDIUo8003383; Mon, 16 Jan 2012 15:18:30 +0200 From: Tomi Ollila To: David Edmondson , Austin Clements , Pieter Praet Subject: Re: [PATCH] Output unmodified Content-Type header value for JSON format. In-Reply-To: References: <1321659905-24367-1-git-send-email-dmitry.kurochkin@gmail.com> <87fwhkyisj.fsf@servo.finestructure.net> <87wrawq1dz.fsf@gmail.com> <87d3coxu7s.fsf@servo.finestructure.net> <87r512pru2.fsf@gmail.com> <87ipmewo4z.fsf@servo.finestructure.net> <20111123034021.GL9351@mit.edu> <87ipkglui4.fsf@praet.org> <20120112172840.GC18625@mit.edu> <87ehv2proa.fsf@praet.org> <87boq4q23z.fsf@awakening.csail.mit.edu> User-Agent: Notmuch/0.11+64~g42e8f66 (http://notmuchmail.org) Emacs/23.3.1 (i686-pc-linux-gnu) X-Face: HhBM'cA~ MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.5.7110, 1.0.211, 0.0.0000 definitions=2012-01-16_01:2012-01-16, 2012-01-16, 1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 suspectscore=0 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=6.0.2-1012030000 definitions=main-1201160097 Cc: notmuch@notmuchmail.org X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jan 2012 13:18:36 -0000 On Mon, 16 Jan 2012 08:49:03 +0000, David Edmondson wrote: > On Sun, 15 Jan 2012 12:58:40 -0500, Austin Clements wrote: > > This, I suspect, brings us back to what may have been Dmitry's original > concern. If we codify the current behaviour then we're actually > _forcing_ clients to use inline content if it's present, because > otherwise they have no way to discover the charset/encoding used for the > raw part. > > That seems as though it could be a problem for some clients. > > > OTOH, I don't understand the encoding story for HTML, since the encoding > > can come from either a header or from the body of the HTML. Does this > > make it strictly necessary for the client to handle the encoding? Either from a header or from the body of the *HTTP*. Html meta tag is part of the header of the HTML document, body of the HTTP message. > If it can be specified by the content of a part rather than the part > headers, then I think that the client will have to be prepared to handle > it. > > Even if not, it might still be more effective to choose that approach - > it would remove the need to add arbitrary encoding support to the CLI > application. In case of w3m interface if charset is not told it defaults to iso-8859-1 as both input and output encoding. That is no problem in w3m -- it just doesn't do any conversion. But emacs thinks that it gets input in iso-8859-1 format and will attempt to convert that to whatever charset the window user has is using. If input was utf8 but emacs thinks input was latin1 then we get this infamous 'double-utf8'ied output (a subset of wtf-8 charset ;) (in case window charset is utf8) In case of w3m the content feed to w3m could be pre-encoded to utf-8 and w3m interface is told that charset is utf-8 -- w3m will now called using utf-8 as input and output encoding -- and at the end emacs does conversion from utf-8 to the window encoding (if needed). As mentioned in IRC: 2012-01-10 11:46 (UTC) xxxXX indeed, the headers should take precedence to meta tag, as defined in HTML4 So, complying clients takes the precedence from command line options (which, in case of command line clients makes perfect sense). Tomi