From owner-freebsd-bugs@FreeBSD.ORG Sun Aug 19 19:08:25 2012 Return-Path: Delivered-To: freebsd-bugs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 70359106564A for ; Sun, 19 Aug 2012 19:08:25 +0000 (UTC) (envelope-from sdaoden@gmail.com) Received: from mail-wi0-f178.google.com (mail-wi0-f178.google.com [209.85.212.178]) by mx1.freebsd.org (Postfix) with ESMTP id F13D28FC16 for ; Sun, 19 Aug 2012 19:08:24 +0000 (UTC) Received: by wibhr14 with SMTP id hr14so2502050wib.13 for ; Sun, 19 Aug 2012 12:08:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:references:in-reply-to:user-agent :mime-version:content-type:content-transfer-encoding; bh=5w2dRFUisybQs6YS6zLaVLleVLaUep6TmbqPXzl2nwc=; b=Kon/if79CB4CT2MRgP97iiRRCANddymCHPkTpcqvLiL5NQxXhOAsGUCdMqma+a/mF/ rlfOResCaYdK6LWP5BCh4107N8wZIu6rXh9rjrIkjcLaTAqirLmV8AMFKEK0Jtt+guQE PXsBckMNe4+6KD+htSsZbang2JPqMhA7x+bi3dfBOroaavxJPoGlekIQME8nTcP5v447 yGvTVefr87IbaabKNkAAKpAQMmHBkSWRBWdKr9H8Pe1hR2bQpWwPq9nT/zCCyiIzqZjz nV/brQKVx4Mfac16HjxthehTcb2OzP9GDUEzY2cTJOFqXwJc55kPcsezPuSXBMaxnmvw kP7Q== Received: by 10.216.226.36 with SMTP id a36mr5586864weq.58.1345403297927; Sun, 19 Aug 2012 12:08:17 -0700 (PDT) Received: from dietcurd.wild-life.local ([89.204.130.207]) by mx.google.com with ESMTPS id z11sm35241020wiv.10.2012.08.19.12.08.15 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 19 Aug 2012 12:08:16 -0700 (PDT) Date: Sun, 19 Aug 2012 21:08:11 +0200 From: sdaoden@gmail.com (Steffen "Daode" Nurpmeso) To: freebsd-bugs@FreeBSD.org Message-ID: <5031399b.kUJVF+DXV14eaKTYNVaSqgGF@dietcurd.wild-life.local> References: <201208181430.q7IEUDYS054727@freefall.freebsd.org> In-Reply-To: <201208181430.q7IEUDYS054727@freefall.freebsd.org> User-Agent: S-nail <12.5 7/5/10;s-nail-9-g517ac44-dirty> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: Subject: Re: bin/170651: On 9.0-RELEASE#0 and master sh(1) gobbles high bit at first X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Aug 2012 19:08:25 -0000 | |>Number: 170651 | |>Synopsis: On 9.0-RELEASE#0 and master sh(1) gobbles high bit at first | |>Confidential: no no no! | |>Severity: non-critical | |>Priority: low | |>Responsible: freebsd-bugs | |>Arrival-Date: Wed Aug 15 15:10:09 UTC 2012 | |>Release: 9.0-REALEASE, and git master branch | |>Description: | [.] | |If /bin/sh is the login shell, starting it won't allow input of | |german umlauts in ISO8859-15 locale with fonts plus well set up. | |Issue a set with arguments ($set +o, $set -o), and it'll work | |as expected. | [.] | |So it turns out the problem is the histedit() function. | |If it isn't called from within optschanged() then everything is fine. | [.] | |The problem occurs when 'el' must be initialized. If that actually | |happens (upon sh(1) startup), then it'll change handling of the high [.] | |The only solution i've found is to call histedit() from within main() | |again (or outsource the pure initialization code to histedit_init(), | |but anyway call it once from within main()). | [.] | | An update: i've compiled the shell again, linked against libedit | as of today (master branch, 493ac26f0cdccc, [Add mvts(4) driver | for internal thermal sensor.., 2012-08-18]), and the problem | persists. (I'm still using 9.0-RELEASE#0, just in case it's even Yet another update. I've #defined DEBUG_READ in libedit and actually found my problem. The reason why the german umlauts don't appear is that they actually result in "ed-unassigned" errors because of the input-to-command map. I'm using multi-platform multi-shell init scripts which i've just recently updated to be compatible to some pretty ancient Bourne-compatible shell, and now it turns out that the plain FreeBSD /bin/sh is classified as "NONE" type at all, so that no set command is used to configure shell behaviour upon startup. I didn't think about this before, hmm. Anyway, once the login shell starts, it's a vanilla shell, but with emacs mode enabled, or at least this is what the '$ set -o' says which then also turns over all the ED_UNASSIGNED to ED_INSERT commands. If nobody jumps into this here i'll try to figure out why, how and where that actually happens and fix it, maybe next week. Ciao, --steffen