support other than String source values for encoding