in reply to counter-intuitive sprintf behaviour
There are several good nodes on this issue floating around the monastery.
Here's one that I found helpful.