Based on your feedback, closer reading of the spec, and testing I've attached a proposed patch series. Unfortunately, I cannot test the last patch since OrCAD does not appear to allow me to enter characters outside the standard list. If there's something that you can test the last patch with then that would be greatly appreciated.
Best, Erich