Wouldn't it be easier to just operate on the ASCII value of the character. Eg, if you want A (65) to X (88), then you can just add 23. This would save a lot of checking what character is which.