Almost. 4 is binary which is switched to 2, content, and anything else is passed through as is.
Even if it works for you, I think you should be looking for alternatives in your XML handling.
Update: and I'm not positive XML::Smart can't do this correctly. Someone might be able to get it to work for you. I just couldn't get it to, passed it encoded and decoded UTF-8 and it turned both into the binary encoding.