added special character encoding and tabbed output