DavidK wrote:
Code:
print "@{2014}"
For this to work the character needs to be entered into the Zcharacter table, which has a few free slots (though not many). This would involve having a declaration at the top of the Inform 6 source like
Code:
Zcharacter table + '@{2014}';
It's often easier to just use the
@print_unicode opcode from the Z-Machine 1.0 specification, like this:
Code:
@print_unicode $2014;
There's a little test file (Unicode.z5 and Unicode.inf) I wrote for testing such things that comes with Windows Frotz, which might help. Also worth reading is Roger Firth's Inform 6 FAQ entry on Unicode handling:
http://www.firthworks.com/roger/informfaq/aa20.htmlAwesome! thanks! I had been trying almost exactly your first method, but without the "+" in the Zcharacter line. (Which now doesn't seem to make a difference.) Looks like Linux "frotz" doesn't do Unicode; everything comes through as question marks. But Linux "fizmo" does the right thing, and so does Parchment, via either method (Zcharacter plus "@{2014}", or @print_unicode).
Fortunately, Roger Firth's FAQ provides the solution!
Code:
[ Unicode c substitute exist;
if (0-->31 < 1) { print (string) substitute; return; }
@check_unicode c -> exist;
if (exist & $0001) @print_unicode c;
else print (string) substitute;
];
Called as Unicode($2014, "--"), this does what I want.