> Sure, you can rewrite the complete shell to use wchar_t * rather > than char *, and if you do that, you can use the new code to handle > ASCII as well, no need to have two copies. But that would be a > huge effort, even more error-prone than the small, careful adjustments > we are doing now, and would have a number of additional downsides; > among others, losing the ability to handle arbitrary bytes, while > in UTF-8 mode.
yes, that's the situation. Code which only uses "char" is less error prone, since there is no smaller C type. As a result a whole class of errors occur less often. Move to a multi-char or larger integer type, and down-conversion errors silently and subtly show up, causing damage. It could be managed. It isn't easy.