encoding setting must be preceded by "apply xtend" statement