I can't seem to do this, as you can see in my code. It's supposed to output a value of 0x90 but it outputs a value of 0x5B when I look at the results of my output in a binary/hex dump.
it's supposed to show a capital E with an accent but it shows a question mark. When I spew the output to a file and look at that file in a hex dump, the value of that question mark is 0x5B (or 91 decimal). it should be 144 decimal or 0x90.
Q: how do I do an output statement correctly? The specs require me to write out unsigned byte data to a file with values of 144 and such.
It looks like the decimal and hex values are what you want (144 and 0x90, respectively), correct? I suspect that your operating system doesn't want to print Unicode characters in the console window. What version of Windows are you running?
I've shown you how to recover the correct hex value. Displaying the character is another thing altogether. As Layne says, your OS has to be configured with the right code page to show non-ASCII characters. You may have better luck in a Swing window than you will at a console window.
Note that Mozilla on my machine, which properly displays Japanese, Chinese, Korean, Cyrillic, Hebrew, and all sorts of exotic scripts, prints "?" for 0x90, too.
So in what character set is 0x90 an E with an accent? in all of the ISO8859 sets, 0x90 is a non-printing character.