This is a essentially a copy of Paul Mackerras encoding support from
gitk. I stole the code from gitk commit fd8ccbec4f0161, as Paul has
already done all of the hard work setting up this translation table.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>