improvements: initial support of terminal encodings