Can I edit this file in Notepad++?



  • I have this application file which I’d like to edit. It has all kinds of signs in it (NUL, ACK, STX etc.). When I copy and paste a line the signs go away.

    How do I edit this file in Notepad++?
    Capture.JPG



  • @Don-Diegue said in Can I edit this file in Notepad++?:

    How do I edit this file in Notepad++?

    Short answer is probably you should NOT do this!

    From a quick web search we have
    SLG files are typically a type of binary file used by certain software, and many software packages can share a common file extension. In the case of files with the SLG extension, popular software packages such as WellSight Oil Well Log, AutoCAD Status Log, and Chromeleon Audit Trail can all open it.
    The operative word here is “binary”. Notepad++ is a text editor not a binary one. Sure, it will open the file and yes you could edit it. However the resulting file would very likely be corrupt (for it’s original purpose).

    Terry



  • @Don-Diegue said in Can I edit this file in Notepad++?:

    How do I edit this file in Notepad++?

    Very carefully?

    Notepad++ is a text editor. If there are bytes showing up as NUL, ACK, STX, etc, then the file you are reading is not a plain-text file, but rather a binary file. It looks like it’s probably some proprietary format that mixes certain control characters with normal text characters.

    We have a FAQ which talks about binary files, and why it’s still considered a binary file even if it does happen to contain some un-encoded text. (It uses .docx and .pdf as examples, but it applies to other binary files as well.)

    You could try to edit just the text portions of that file, trying to avoid the control characters. But if you do that, you might find that when you change the lengths of strings, whatever application actually uses the test0.slg file might crash, or otherwise behave unexpectedly.

    Using a text editor to edit a binary is dangerous; do so at your own risk. Make sure you have good backups.

    (Terry beat me to it.)



  • @Terry-R Thanks, this .slg file actually comes from a very small, free application for writers called Story LANGuage.
    You say it’s possible to edit such file with a binary editor. Can you recommend one?



  • @Don-Diegue said in Can I edit this file in Notepad++?:

    You say it’s possible to edit such file with a binary editor. Can you recommend one?

    No, and that’s because as has been mentioned already ( @PeterJones ) there will be a specific format to the data within the file. Changing lengths, or possible delimiters without knowing the exact format contained within will very likely lead to a corrupt file. Having said that again as @PeterJones said, the text portions might be editable without corrupting the file.

    But I would strongly suggest you do not edit this file with anything other than the “owning” application, which you say is Story LANGuage.

    Terry


Log in to reply