In-file encoding detection fails when the first 512 bytes isn't a valid UTF-8 string. Function `g_regex_match_full`, used [here](https://github.com/geany/geany/blob/06acd17cbeab6c0154e752b584aaf5001d9af1e8/src/encodings.c#L351), expects a valid UTF-8 string unless `G_REGEX_RAW` option is used - see [documentation](https://docs.gtk.org/glib/method.Regex.match_full.html). Possible solution is to add `G_REGEX_RAW` to function `g_regex_new`, used [here](https://github.com/geany/geany/blob/06acd17cbeab6c0154e752b584aaf5001d9af1e8/src/encodings.c#L329).
-- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/3777 You are receiving this because you are subscribed to this thread. Message ID: <geany/geany/issues/[email protected]>
