Refactor old encoding function away
Build does not use TERM variable if not available