Question 1: A Perl solution 

#!/usr/bin/perl

while (<>) {
    s/A/\x5C/g;
    s/B/\x5F/g;
    s/C/\x7C/g;
    s/D/\x7C/g;
    s/E/\x5F/g;
    s/F/\x20/g;
    s/G/\x7C/g;
    s/H/\x5C/g;
    s/I/\x5F/g;
    s/J/\x2F/g;
    s/K/\x20/g;
    s/L/\x2F/g;
    s/M/\x7C/g;
    s/N/\x5F/g;
    s/O/\x20/g;
    s/P/\x7C/g;
    s/Q/\x20/g;
    s/R/\x20/g;
    s/S/\x5F/g;
    s/T/\x2F/g;
    s/U/\x20/g;
    s/W/\x5C/g;
    s/X/\x20/g;
    s/Y/\x7C/g;
    s/Z/\x20/g;
    print;
}