Encode should be called only for strings

If not string provided as arg to print_to_output
it should not be encoded, and lets assume that proper unicode handling
will be done in custom print_method

Change-Id: If0c03571ccc7513fe85c38477ad9750ad9d82e97
Closes-Bug: #1330485
Merge "Encode should be called only for strings"