Added data encoding for socket, i.e ascii or utf8 encoding supported