Added support for newlines and unprintable chars