Update ANSI code interpolation to cover more cases