Add one character, file becomes unloadable



  • I have used npp for ages to edit source code from an old text-based language and there’s always been a problem opening certain files - n++ launches with a blank screen and displays no error messages. I’ve updated to the latest version etc. to no avail.

    So, I’ve reduced it to the bare bones - two files containing only a single IBM line-drawing character (0xC4). File 1 is a 9-byte file with 9 consecutive instances of this character and opens fine, file 2 is a 10-byte file with 10 instances of the same character and won’t open.

    Adding CRLF or EOF at the end makes no difference. Moreover, saving a file which has opened blank results in a zero-byte saved file.

    I’ve countless other files which contain various line-drawing characters and some of them display properly, others as squares but they always save correctly, it’s just these few files that simply won’t open in npp (they open, but nothing is displayed).

    Any thoughts??



  • Hello @Gordon-Todd,

    I assume that autodetect character encoding is enabled.
    I would give it a try to check it with disabled auto-detection

    Settings->Preferences->Misc
    uncheck autodetect character encoding

    Cheers
    Claudia



  • Thanks Claudia, that seems to have cured it :-)


Log in to reply