The 'navy-toal' variation of this code uses ISO Latin1 (8859-1) to encode 8-bit chars.

You may need to do something like this in order to see the output correctly,

 locale en_US.iso8859-1
 export LC_ALL=en_US.iso88591
 export LANG="$LC_ALL"

and also if in putty, go into settings and set the display encoding to 8859-1 as well.
