How to NOT show STX code on text page ?



  • Hello ,
    The STX character is showing in a .txt document ,
    like this: “the author has given a succinct account of English Puritanism” .
    Pls , how can I get rid of this ?
    Thanks for your Help… !
    https://vmars.us/ShowMe/STX.png



  • @vmars-vernon

    If the STX character is showing in the file, that means the STX character is in the file – whether it was there originally, or whether you accidentally added it, I could only guess.

    If the character was in the file before you got it, then either there was some sort of corruption in the file, or it’s actually a binary file that just happens to be mostly plain text, but with some control characters embedded intentionally. (The word processors I used in the early 90s worked that way.)

    If the file intentionally contains that or other binary/control characters, Notepad++ is the wrong tool to be looking at your file – you might accidentally corrupt the file, and make it unusable for its intended purpose.

    If it was corruption or unintentional, then it should be safe to get rid of it.

    how can I get rid of this ?

    Do you want to delete the character? Or just hide it?

    Delete:

    • Delete the character one at a time by putting the cursor after and hitting Backspace
    • Delete the character one at a time by putting the cursor before and hitting Delete
    • Delete the character in bulk using a regex search-and-replace (FIND = \x02, because STX is ASCII 2; replace = empty, sear mode = regular expression)

    Hide:

    • PythonScript: editor.clearRepresentation('\x02')

    (Any plugin that can send the SCI_CLEARREPRESENTATION message will work; just used PythonScript because that’s most convenient for me.)

    https://vmars.us/ShowMe/STX.png

    It’s sad that you’ve been here since 2015 and still haven’t learned how to properly embed an image so we can see it without clicking, either by using the old way (which still works) of using markdown code to link to the external image, or by using the newer way (which is so much easier) of just having the image in your copy buffer and pasting it in your reply, which will host the image on our server, so IT departments will be less likely to block it – and that way it would still be a valid image even if you later decide to delete the file off of vmars.us, which I assume is your personal domain:

    Old way: ![](https://vmars.us/ShowMe/STX.png)



  • @PeterJones said in How to NOT show STX code on text page ?:

    editor.clearRepresentation(’\x02’)

    Note that this is only a temporary “fix” to hide the STX character – if you switch the tab you are editing in Notepad++ and then switch back, the STX character will again be visible.



  • @PeterJones
    or by using the newer way (which is so much easier) of just having the image in your copy buffer and pasting it in your reply, which will host the image on our server, so IT departments will be less likely to block it – and that way it would still be a valid image

    264174d9-dacd-4da7-9f4e-39cac0b30413-image.png

    Thanks Peter


Log in to reply