revert code shuffling regarding textline output
Un-duplicate code and enable charmap encoding when info.regex suggests