In my use case, I have a lot of text files containing invalid characters. When I search through those files, e.g.
grep "some text" /home/bla/blubb/* | xargs editor_of_your_choise
I'm getting the issue that whenever a file is opened containing any invalid characters, there is a popup in the editor.
There was a problem opening the file foo.txt
The file you opened has some invalic characters. If you continue editing this file you could corrupt this document.
In gedit's case showing three buttons, Retry, Edit Anyway, X. I have to use the mouse to press Edit Anyway, which is really annoying, if you have to do it for every file separately. Until I do it, the editor is blocked.
With Kate, it only allows me to use the file in a read-only state.
Is there a way to open the files forced to edit right away?