undefined support to encode as well