Finish 3744

This finishes the great pull request started by @mickaelandrieu in #3744.
I tested it with single char codes (just what I showed in my comments in @mickaelandrieu's PR). I would recommend doing that