5

I came across a question by a new user today. I assume that due to unfamiliarity with the intricacies of the SE editor, they tried to mark a code block using `...` - which didn't quite produce the desired result [1].

At this point, I didn't plan to answer, but just to improve the readability of the post by editing it - when I noticed that the raw post contained some non-printable characters, which for me, were a clear indication of the problem with the OP's code:

Screenshot of the end of the OP's raw post

Unfortunately, after adding indentation and converting the OP's code into a proper code block, these symbols were gone, and with them an important hint to the issue exhibited by the output.

My question: was there some other way to convert the OP's text into code, while preserving the non-printable characters?

P.S. in case this is somehow related to my system configurations, I was using FF 60.0 on Win10.

7
  • It's worth noting that the problem appears to occur only after saving the post, which means it's a problem with how it's being saved or sent, not with how you're applying the edit. It also doesn't work to use <pre><code>. Commented May 15, 2018 at 11:59
  • Meh, don't worry about it. Accurate garbage doesn't look that different from formatted garbage. Commented May 15, 2018 at 12:33
  • @HansPassant while I cannot argue with your statement, I do believe that this is a legitimate concern in similar scenarios (i.e. it's a serious issue if indeed some characters vanish arbitrarily from posts).
    – Dev-iL
    Commented May 15, 2018 at 12:37
  • Wouldn't that make it a a simple typographical error for which we have a close reason? Honest question, because I can't make much out of the code in the question.
    – ivarni
    Commented May 15, 2018 at 12:42
  • @ivarni I believe it's a legitimate question and not a typographical error. The problem is that OP did not use a function that converts numbers into characters (i.e. split into digits and add the ASCII value of 0). In that case, single digits would be printed as their ASCII value, which is a bunch of non-printable characters (appearing in the screenshot as squares). I saw this happen plenty of times, so the immediate suspect was the missing conversion. In my post I meant to say that the OP's problem would be more difficult to pinpoint had it not been for these non-printable characters.
    – Dev-iL
    Commented May 15, 2018 at 12:55
  • I see. Fair enough :)
    – ivarni
    Commented May 15, 2018 at 12:56
  • I had the same problem here. The OP was able to paste some text including a Ctrl-Q into his question. I found the question in the close queue and wanted to edit it to make his problem clearer. My attempts to edit it removed the Ctrl-Q.
    – Kenster
    Commented May 15, 2018 at 15:03

0

You must log in to answer this question.

Browse other questions tagged .