Changed encoder_flags to text instead of string.