If we want this to happen we should talk about the way to specify the format string.
Adding Steve to CC to get his input. There is some basic format support in maptemplate.c for query result field values, but it seems quite limited. I wonder if we could use the same or if we would be better use a print-like format string.