Date: Thu, 29 Oct 2015 13:00:39 +0000 From: RW <rwmaillists@googlemail.com> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20151029130039.2686f34a>