zkrepl icon indicating copy to clipboard operation
zkrepl copied to clipboard

Junk characters in STDOUT output

Open artwyman opened this issue 1 year ago • 1 comments

Using zkrepl to compile code on Chrome on Windows, I see a variable number of invalid characters (appearing as rectangles) show up in the output before the normal output of the compiler. If I scroll down past them, the output is otherwise correct: image1 image2

I'm not a web expert, but I think the Chrome dev tools are telling me that these are null characters:

image3

This happens for any input, including the initial example zkrepl comes up with. I've seen this in Chrome and Edge on Windows10, but I don't see it on Firefox. I've seen the issue on two different machines with the same OS version, but I don't have any other platforms handy. A friend tried this in Chrome on Linux and Mac and didn't see the issue. Noting that Chrome and Edge share the Chromium rendering engine, I suspect this might be a specific behavior of that engine when running on Windows.

artwyman avatar Jun 03 '23 06:06 artwyman

I am able to reproduce this in Chrome on Windows 10 with the example template.

I wonder if it would be an acceptable workaround to simply strip these characters at https://github.com/0xPARC/zkrepl/blob/1e8d06d3587bc75eacfa9caa259cce2a0e387f58/src/worker/worker.ts#L67

saurfang avatar Jun 05 '23 18:06 saurfang