This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Leaf's profile picture

CP437 is not supported, although the glyphs are in the MineCraft font image.

Started by Leaf, 20 December 2012 - 03:18 PM
Leaf #1
Posted 20 December 2012 - 04:18 PM
(CC 1.47 + MC 1.4.5)

Maybe not quite a bug, but…

Codepage 437 support ( http://en.wikipedia...._437#Characters ) would be cool, for all those neat little graphical and box-drawing symbols. All of the glyphs for it are in default.png, but CC outputs the '?' character instead.

Of note though, Java's built-in CP437 support is broken (or at least flawed from the perspective of using CP437) in that it won't translate the glyphs corresponding to characters 0x01-0x1f and 0x7f up into the UTF-8 space like it's supposed to. Or at least it doesn't for me, but maybe I don't know what I am doing. :P/>

To that end, here is a table that can be used instead: http://pastebin.com/yZzzA9k2 . This is assuming that MineCraft can actually print the CP437 glyphs that they've included in default.png, which I dunno about.

Also, although most 31- and 127+ characters currently go into the Terminal properly and output a "?", characters 9 (horizontal tab) and 10 (linefeed) do not. Upon examining the class files and fooling around in a debugger, it appears to me that this is a result of java's string handling messing something up, due to the way that each line in the Terminal is stored as a string. I think this would have to be rectified to get all 254 printable characters out of CP437.

Thanks for reading! ^_^/>
Cranium #2
Posted 20 December 2012 - 05:58 PM
It's not a bug as far as I know, and I believe this was intended behavior when it was originally released. There has been growing support for the inclusion of ASCII support, and possible unicode support. Not sure if this has been approved, but I'm sure Cloudy or Dan will correct me.
Leaf #3
Posted 21 December 2012 - 11:26 AM
Definitely doable on a JPanel with a fairly bare subclass of Terminal (except for the two aforementioned characters), but it's not using any of MC's font rendering stuff, other than default.png.

If there is any code I can contribute to help make this happen, please let me know! :)/>



PS: I hope it's ok that I have been poking around the class files and writing code to work with them, even though there hasn't been a source release. It is a bit rude of me, and I apologize, but the little simulator program looks less suspicious at work than actually running Minecraft. >_>