I don't have a solution for the question you're actually asking, that is, how to copy text and have it come out readable.
However! It looks from your example like the "encryption" here is a simple character substitution. This being the case, it wouldn't be too hard to pass the copied text through a filter to decrypt it and produce a readable result. For example, assume the following script called decrypt.pl
:
#!/usr/bin/perl use strict; use utf8; binmode STDIN, ':utf8'; my %map = ( # from => to 'z' => 's', 'd' => 'h', 'n' => 'e', 'a' => 'i', '~' => 'u', 'g' => 'n', 'f' => 'a', 'p' => 'p', '' => 'r', 'b' => 'o', 'j' => 'c', 'd' => 'h', '`' => 'b', 'h' => 'l', # other substitutions here ); while (my $line = <STDIN>) { foreach my $char (split(//, $line)) { my $upcase = (lc($char) eq $char ? 0 : 1); my $found = $map; if (!$found) { die "No substitution found for character '$char'\n"; }; $found = uc($found) if $upcase; print $found; }; };
If you copy whatever text you want from the PDF into a file called e.g. source
, then execute cat source | perl decrypt.pl > destination
, then the file destination
will contain the decrypted content:
[user@host tmp]$ echo 'Zdn az ~gfppbfjdf`hn' > source [user@host tmp]$ cat source | perl decrypt.pl > destination [user@host tmp]$ cat destination She is unapproachable [user@host tmp]$