Allow overriding charset in some decoding functions