adding bare-bones support for handling control characters