api fix on host ip address for telnet client
Updating treament for non ansi colour mode.
Updated test and code to work for the non assci case and remove unicode 
encoding.