Path: csiph.com!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail From: Eli Schwartz Newsgroups: gnu.bash.bug Subject: Re: command "cat /etc/localtime" breaks output on tty-terminal Date: Sun, 23 Jun 2019 13:00:28 -0400 Lines: 137 Approved: bug-bash@gnu.org Message-ID: References: <20190623123102.fa9221e067faed8874ea7fc2@gmx.de> <20190623141810.d3ba78fb13821008b401f45f@gmx.de> NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="EVGWKhwlT32FovmpTOAEnpKsnfrDvvh4g" X-Trace: usenet.stanford.edu 1561309255 19301 209.51.188.17 (23 Jun 2019 17:00:55 GMT) X-Complaints-To: action@cs.stanford.edu To: bug-bash@gnu.org Envelope-to: bug-bash@gnu.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=archlinux.org; s=orion; t=1561309233; bh=FtzUpEwLr+HBffk8GX5yLQ0NUrzbuNviG4KAI1tjn0M=; h=Subject:To:References:From:Date:In-Reply-To; b=gCm0rCy0sc0d9njD1/saul8zS4zoioNFhFJz8Cd0jIQtCNKR7YhUvLUoC/ds8xA2P Rx+z6mNIETFsYBgz9OWshg6dF5C0SppZ5y5J0jweNl0DqcgpCMyYad2OCG534x8Xqh NWS6iMs5mhTzxPghdrke61LoiJXsDJ5pvL7SdAz+rspa0xspproahkfUwzJKzGve4d HX3g63dM7FoxVoG7CG54fSQdyhGENLlKcyCggFG5abYuxyi2ed8OtImkz8rhPBFL1d 2acmjxcBGQMSgh1C3BLzdFE8bfNx8//kelKQwdJgUWlLoyoqqO7rb0eS1LCBV2pfFs jkR0C19/nKOJlx3DV/Qn04MLcJ8UJwLZsulCXDrfyFWEJl6cZ0pn1ZUz3PH2tBsUb7 FkXP/5yF81SvIlQpxGb8oRj1yyYmbZaqfBpGotPweKm/rIw6NLFEWpr3xNUg7gvEWk VnoMNH357YTbCMsbhbND6Nbjk34m5mV+IAkl47HVs/a9z7CBaQCpP7forfCInWEmPe VEzcDdAlx0+M/yzwAGkZQ/AnQU9cxsf3DmYaqsJUYmZge0wgysxdPjVR6kT/lVin2e wKs09hCcZaE31+0faH0+aGGvCHccSy2z5k+J+zROAP8e5m5/eAdEAtAXzjf2ZU6GkI n2PmCPHZ6ea25khSWzHsIA+k= Openpgp: preference=signencrypt X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.1 In-Reply-To: <20190623141810.d3ba78fb13821008b401f45f@gmx.de> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 88.198.91.70 X-BeenThere: bug-bash@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Bug reports for the GNU Bourne Again SHell List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: X-Mailman-Original-References: <20190623123102.fa9221e067faed8874ea7fc2@gmx.de> <20190623141810.d3ba78fb13821008b401f45f@gmx.de> Xref: csiph.com gnu.bash.bug:15070 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --EVGWKhwlT32FovmpTOAEnpKsnfrDvvh4g Content-Type: multipart/mixed; boundary="TEBDJeuyWKzrhIbZ43H5WluFebQ5OEqGK"; protected-headers="v1" From: Eli Schwartz To: bug-bash@gnu.org Message-ID: Subject: Re: command "cat /etc/localtime" breaks output on tty-terminal References: <20190623123102.fa9221e067faed8874ea7fc2@gmx.de> <20190623141810.d3ba78fb13821008b401f45f@gmx.de> In-Reply-To: <20190623141810.d3ba78fb13821008b401f45f@gmx.de> --TEBDJeuyWKzrhIbZ43H5WluFebQ5OEqGK Content-Type: text/plain; charset=utf-8 Content-Language: en-US-large Content-Transfer-Encoding: quoted-printable On 6/23/19 8:18 AM, bitfreak25 wrote: > On Sun, 23 Jun 2019 06:04:29 -0500 > Dennis Williamson wrote: >=20 >> On Sun, Jun 23, 2019, 5:31 AM bitfreak25 wrote: >> >>> OS: Arch Linux 5.1.12-arch1-1-ARCH (tty1) >>> Bash-Version: 5.0.7(1)-release >>> localization: de_DE.UTF-8 UTF-8 >>> keymap: de-latin1-nodeadkeys >>> >>> Description: >>> The command "cat /etc/localtime" was called in a tty-terminal. After = that >>> some characters will be printed incorrectly (mostly "cyrillic" chars >>> instead of the correct ones). The typed chars seems to be handled cor= rectly >>> (e.g. calling "exit") but the output is broken at this point. This >>> behaviour is reproducible on my other PC with Debian Stable (Bash-Ver= sion >>> in Debian: 4.4-5), so it seems to be a old bug. Changing to another t= ty or >>> rebooting the OS will fix this behaviour until the command is called = again. >>> >>> Kind regards, >>> bitfreak >>> >>> >> >> >> /etc/localtime is symlinked to a file that contains time zone data. If= you >> enter the command >> >> file -L /etc/localtime >> >> you'll see that that's the case. It contains data that's not meant to = be >> displayed including control characters which cause the effect you obse= rved. >> If you cat any so-called binary file such as this you are likely to se= e the >> same kind of thing happen. Entering the >> >> reset >> >> command in the affected terminal will correct the problem after it occ= urs. >=20 > I kind of thought that this could be the reason. It also happens with > "cat /dev/urandom" which is stopped by [STRG] + [C]. >=20 > It seems to be a very small bug thats only breaks the output with an > unusual command and there are already 3 workarounds. But in my opinion > it should be fixed some time as it isn't the correct behaviour like > doing it with a gui-terminal e.g. xfce4-terminal. All GUI terminals in my experience display the correct behavior. The correct behavior is to: - faithfully emit the output you requested - thereby emit control characters which the terminal cannot properly parse - break terminal output in some cases, depending on the control characters in question Some programs, unlike cat, try to protect you from this effect. See for example, $ curl file:///etc/localtime Warning: Binary output can mess up your terminal. Use "--output -" to tel= l Warning: curl to output it to your terminal anyway, or consider "--output= Warning: " to save to a file. --=20 Eli Schwartz Arch Linux Bug Wrangler and Trusted User --TEBDJeuyWKzrhIbZ43H5WluFebQ5OEqGK-- --EVGWKhwlT32FovmpTOAEnpKsnfrDvvh4g Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----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