@elextr not supporting NULs is one thing, but we should not truncate silently (and we think we don't do that, so if we do there's a problem somewhere).
Agreed, but the OP doesn't mention that, like I said elsewhere the code has evolved to be a bit of a mess and I wouldn't be surprised if it has "undocumented features".
Like this one [here](https://github.com/geany/geany/blob/e5680fe85de536fc61ff0f2d4eadc54171d6c982...) talks about `temp_enc_idx` being various unicode values, but in fact `encodings_scan_unicode_bom()` returns [`GEANY_ENCODING_NONE`](https://github.com/geany/geany/blob/e5680fe85de536fc61ff0f2d4eadc54171d6c982...) if there is no BOM, so `partial` is not set. So when it is returned to [here](https://github.com/geany/geany/blob/e5680fe85de536fc61ff0f2d4eadc54171d6c982...) as `readonly` (see I told you it was a mess) the message is skipped [here](https://github.com/geany/geany/blob/e5680fe85de536fc61ff0f2d4eadc54171d6c982...).
And now I am going to have a lie down with a wet cloth on my forehead :frowning_face: