Handle backspace at end of input for wide chars