From owner-freebsd-questions@freebsd.org Thu Oct 29 13:00:50 2015 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 30B33A129D2 for ; Thu, 29 Oct 2015 13:00:50 +0000 (UTC) (envelope-from rwmaillists@googlemail.com) Received: from mail-wi0-x234.google.com (mail-wi0-x234.google.com [IPv6:2a00:1450:400c:c05::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C23E118EC for ; Thu, 29 Oct 2015 13:00:49 +0000 (UTC) (envelope-from rwmaillists@googlemail.com) Received: by wikq8 with SMTP id q8so283556768wik.1 for ; Thu, 29 Oct 2015 06:00:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=date:from:to:subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; bh=75ytXqCP1zdsqFeKlL3x2sfuTo/xuwTWOIelYWSEkE0=; b=oGNiu/C5V9P1iSe0HaJCI8K+YbtKw1eVOwd1oDY5hRHDll/2F19lVSo3Fk10mhRzP+ LSvybzZXztCz4OLq/kS+FF0u+FkCZ0W9ESfD8w7tIHl6uVZVkJMcFX2Xws8N9/CfWz+c 117DPvqmF0IK15Qq8jRogDg9ccxzLEyDq2/MF0ChelwxNOB6muRG2fspxzw4jK7T6Rwb U80Nq3NDiYje/bZUBMzacG1wyaRX5dFuy2v3RWfuPrLA0Y9I//8vSWp6ZWiUGTqgl7aG 1GlraKwAYDLkQUqYAunJGw/6ZjUEGR58i+ZiF0NtTF33V+439+5mGOwaaVTBhgBBnRzr G3LQ== X-Received: by 10.194.116.42 with SMTP id jt10mr2087172wjb.117.1446123647342; Thu, 29 Oct 2015 06:00:47 -0700 (PDT) Received: from gumby.homeunix.com ([90.195.214.153]) by smtp.gmail.com with ESMTPSA id h7sm1738796wjz.7.2015.10.29.06.00.44 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Oct 2015 06:00:46 -0700 (PDT) Date: Thu, 29 Oct 2015 13:00:39 +0000 From: RW To: freebsd-questions@freebsd.org Subject: Re: tr(1) and LANG=de_DE.UTF-8 Message-ID: <20151029130039.2686f34a@gumby.homeunix.com> In-Reply-To: <20151029103133.GA16882@sh4-5.1blu.de> References: <20151029103133.GA16882@sh4-5.1blu.de> X-Mailer: Claws Mail 3.13.0 (GTK+ 2.24.28; amd64-portbld-freebsd10.2) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Oct 2015 13:00:50 -0000 On Thu, 29 Oct 2015 11:31:33 +0100 Matthias Apitz wrote: > Hello, > > I was wondering why I could not patch a byte \357 in a file with > tr(1): > ... > [guru@kant-r269739 ~]$ LANG=de_DE.UTF-8 > tr '\357' '\000' < /tmp/x | od -c ... > until I changed the LANG to C: In UTF-8 a byte containing \357 can only exist as part of a multibyte character. Presumably tr interprets \357 as a character rather than a byte.