treat % as a special case because it has to be done last during decode.