Optimize write of characters.

Do not double copy converting characters to network but use TDS packet
buffer for conversion.

Signed-off-by: Frediano Ziglio <freddy77@gmail.com>