Converts string to unicode before tree insertion

This coerces strings into UTF-8 encoding before adding the line to the
tree. If the string still raises an exception, then the NXobject name
is printed without its value.