>From my early tests it works fine loading and saving embedded NUL bytes, but I >expect many features not to work properly (although e.g. regex search seems >happy, yet displaying results not so much). It however should help getting to >a point where these could be handled properly, and is handy also for slightly >broken files and alike. Anyway for now such files are loaded read-only and display a warning to the user to avoid most problems.
Related to (and should fix for the most part) #618 and #1708 (and possibly others). You can view, comment on, or merge this pull request online at: https://github.com/geany/geany/pull/1709 -- Commit Summary -- * Avoid weird length value * Add sci_set_text_with_length() * Don't cut the loaded data at the first NUL when passing it to Scintilla * Don't cut UTF-8 documents at the first NUL byte when saving them * encodings: Accept NULs when validating UTF-8 * Properly load files with embedded NULs * Show an infobar for files with embedded NULs -- File Changes -- M src/document.c (58) M src/documentprivate.h (1) M src/encodings.c (118) M src/encodingsprivate.h (2) M src/sciwrappers.c (10) M src/sciwrappers.h (2) -- Patch Links -- https://github.com/geany/geany/pull/1709.patch https://github.com/geany/geany/pull/1709.diff -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/pull/1709
