It cannot be the case that String.toUpperCase() does anything but convert to upper case in a given char set.
Your question seems to imply that the link between your system and the host is done using 8-bit character set (ASCII ?). However, Java uses 16-bit characters, in a variety of character sets (UTF-16, UTF-8, etc.) So, there must be something doing the conversion, both in interpreting the character set, and converting to 8 bit. If the character set is UTF-8, then the first 127 chars map 1-1 with ASCII. However, you are concerned with chars outside of that range, so a more complex conversion is needed. I'm guessing that is where the problem is.
So I think you should:
- Find out what char set the host is expecting
- Find out where the conversion from Java 16-but chars is happening. Are you doing that yourself?
I would guess that the strange behavior is somewhere in there.
Sorry I can't be more help. If you give me more details about the comm link, and the conversion process, I might be able to shed more light on what's going on