From owner-svn-src-all@FreeBSD.ORG Wed Dec 28 19:36:08 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C7FC5106564A; Wed, 28 Dec 2011 19:36:08 +0000 (UTC) (envelope-from uqs@spoerlein.net) Received: from acme.spoerlein.net (acme.spoerlein.net [IPv6:2a01:4f8:131:23c2::1]) by mx1.freebsd.org (Postfix) with ESMTP id 50FCF8FC0C; Wed, 28 Dec 2011 19:36:08 +0000 (UTC) Received: from localhost (acme.spoerlein.net [IPv6:2a01:4f8:131:23c2::1]) by acme.spoerlein.net (8.14.4/8.14.4) with ESMTP id pBSJa7M2019799 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Wed, 28 Dec 2011 20:36:07 +0100 (CET) (envelope-from uqs@spoerlein.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=spoerlein.net; s=dkim200908; t=1325100967; bh=b0maSZUWOZWGWqcXeCK8QZs6IVRMdstQJP6V+2Xbkog=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Transfer-Encoding:In-Reply-To; b=WQ9e1JS4MsjyoYkHj4yQylQ+Yq73LLdbhN2HzAxmL40uEGJ/a2Ew1lOlugJbzGm6Z 9Bm80GoYfVaVfFQhZvwIicU7lI7gzg+3rxBnEFJ6MKTl/X260UjB6OtaWANlJEPRfQ Ejb27QjS/lHihoXWS49sgMkawnafEpdLh8BwVhkE= Date: Wed, 28 Dec 2011 20:36:07 +0100 From: Ulrich =?utf-8?B?U3DDtnJsZWlu?= To: Doug Barton Message-ID: <20111228193607.GF83814@acme.spoerlein.net> Mail-Followup-To: Ulrich =?utf-8?B?U3DDtnJsZWlu?= , Doug Barton , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <201112271021.pBRALvxB048644@svn.freebsd.org> <20111228155340.GE83814@acme.spoerlein.net> <4EFB58F1.6020206@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4EFB58F1.6020206@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r228909 - head/games/fortune/datfiles X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Dec 2011 19:36:09 -0000 On Wed, 2011-12-28 at 09:59:13 -0800, Doug Barton wrote: > On 12/28/2011 07:53, Ulrich Spörlein wrote: > > On Tue, 2011-12-27 at 10:21:57 +0000, Doug Barton wrote: > >> Author: dougb > >> Date: Tue Dec 27 10:21:57 2011 > >> New Revision: 228909 > >> URL: http://svn.freebsd.org/changeset/base/228909 > >> > >> Log: > >> 1. Remove a bunch of duplicates. Usually this means removing them from > >> fortunes, but occasionally remove them from the other 2 files when > >> they are not offensive, or not murphy'ish enough. > >> > >> Where the version in fortunes had better attribution and/or formatting, > >> copy it over. > >> > >> 2. Fix a few typos > >> > >> 3. Use the full name of François De La Rochefoucauld, fix one of his > >> quotes, and remove the duplicate of it. > > > > Sigh, > > > > except for a stupid Unicode version of an apostrophe (’ vs ') > > That seems like an easy thing to fix? Sure, somebody must have snuk that in while I was not watching ;] However, the real solution would be some sort of pre-submit check or even breaking the build when the datfile is not 7bit clean. The state is that all datfiles were ASCII clean some time in the past, except for gerrold.limerick which has a unicode (C) in a comment, so it doesn't actually affect operation of fortune so I left it in. > > this file > > was ASCII. And I made it so for a reason. We don't currently have a way > > to iconv fortune(6)'s output to the users LC_CTYPE. ASCII is the common > > denominator so that's what we have to choose to be bug free. > > What breaks for non-ASCII text? If your terminal is ISO8859-1 (aka latin1) or an other non-UTF-8 groking terminal, you'll get garbage instead of François. Not a biggie but ugly anyhow. > > My plan was to teach fortune to use bsdiconv once that is ready and in > > the tree to convert from Unicode to the users' locale. But until that is > > ready, we have to stick to ASCII. > > I'm not opposed to doing that, but I want to make sure that a) it's for > a good reason, and b) that we have some way to know what needs to be > added back when it's safe. > > Meanwhile, I did actually test this change and it worked for me, so I > thought it was safe to proceed. Your terminal understands UTF-8, so you don't see a difference between ASCII and Unicode chars. Try setting LANG to, e.g. en_US.ISO8859-1 and run xterm +u8 with it (just to make sure). Then, when displaying a quote you get: % fortune -m Rochefoucauld %% (fortunes) Absence diminishes mediocre passions and increases great ones, as the wind blows out candles and fans fires. -- François De La Rochefoucauld (I hope this makes it through the way I see it). It all boils down to that fact that fortune(6) is not locale aware and thus only ASCII chars are safe to display (no EBCDIC does not count). > > This is not a backout request, > > I've no objection to making a change. Apparently the De should be de > anyway, so what do you suggest? I cannot speak to that with any authority. Uli PS: I'd love for us to drop supporting anything but Unicode, but then again I'd also would like to have a pony ...