encode implicit, explicit and default tags