[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bash displays strange characters after base64 decoding
From: |
Geir Hauge |
Subject: |
Re: bash displays strange characters after base64 decoding |
Date: |
Fri, 7 Aug 2015 15:08:03 +0200 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Thu, Aug 06, 2015 at 07:45:53PM +0200, Valentin Schmidt wrote:
> Bash displays strange characters (including command prompt) (see attached
> png file) after the execution of the base64 (GNU coreutils 8.21) command
> like described as follows:
> base64 -d base64.txt
Xterm has some escape sequences that switch between a second character
set, where many of the ascii letters become line drawing characters
instead.
Try the following:
printf %b '\e(0' {a..z} '\n' '\e(B' {a..z} '\n'
This prints the 26 lowercase ascii letters in the second character set,
entered by the sequence ESC ( 0, followed by the same line after
switching back, with the sequence ESC ( B. In a Gnome Terminal on Ubuntu
I get the following output from the above:
▒␉␌␍␊°±␋┘┐┌└┼⎺⎻─⎼⎽├┤┴┬│≤≥
abcdefghijklmnopqrstuvwxyz
Sven Mascheck has written a bit about this fun feature here:
http://www.in-ulm.de/~mascheck/various/alternate_charset/
--
Geir Hauge