added support for custom tps file string encoding like CP850