I rechecked the encoding of the files. I noticed that this happens to files that have ANSI encoding, and by changing them to UTF8, I was able to edit the file without displaying an error. I think this type of file should be added somewhere in the ace editor settings for editing.
Also I made the following change in ace.editor.config.json in /www/server/panel/BTPanel/static/ace :
"encodingList":["ASCII","ANSI","UTF-8","GBK","GB2312","BIG5"],
But still the same error is displayed for editing ANSI files
Do you have any suggestion?