Z-Machine-Standard icon indicating copy to clipboard operation
Z-Machine-Standard copied to clipboard

stream 4 and non-ZSCII filenames

Open borg323 opened this issue 6 years ago • 5 comments

Section 7.5.4 says that "Non-ZSCII characters never need to be printed to stream 4." However, if filenames are also recorded, how are those that contain non-ZSCII characters handled?

borg323 avatar Jul 20 '19 00:07 borg323

I don't think filenames should be sent to stream 4. Only what comes through @read and @read_char.

curiousdannii avatar Jul 20 '19 00:07 curiousdannii

Just noticed this remark:

An ambiguous point about output stream 4 is whether it should contain the answers to interpreter questions like "what file name should your saved game have?": it can actually be quite useful to be able to include such answers in test script files. (When running a long script, I often save the game at several places during it, in order to save time in re-running passages.)

And I see the point there. If you do want to stream filename, then I guess you could do that in any format, as long as the interpreter knows how to read it back.

curiousdannii avatar Jul 20 '19 00:07 curiousdannii

Agreed, but shouldn't section 7.5.4 be amended?

borg323 avatar Jul 20 '19 13:07 borg323

Probably a brief note in 7.5.4 about the possibility of non-ZSCII characters if the interpreter is sending this sort of data to stream 4, and a better note in the remarks describing what to do about it (with 7.5.4 mentioning to look at the remarks). I'll try to type something up soon.

DFillmore avatar Jul 20 '19 14:07 DFillmore

Section 7.5.4 always bothered me, because clearly stream 4 needs non-zscii output if input from the extra-characters table is being used, unless you only output the zscii value instead of the actual unicode input (yuck). Also, it raises an even uglier specter, of whether stream 4 represents the actual input (including unicode, mouse clicks, and timing) or only the input's effect on the game (zscii, timeouts, etc.) It would require a pathological story file to make a practical difference, but it is possible.

crawlingChaos avatar Apr 14 '20 18:04 crawlingChaos