[TIMOB-12347] Added terminal character encoding detection.