Update files_texteditor/ajax/loadfile.php

The problem was, that loadfile.php (the file text-editor) did not correctly load ISO/ASCII encoded files.

After tons of blogs I found a solution:

You have to specify the possible encodings when calling mb_detec_encoding. Then the detection works. Possibly an error in PHP.

You can list all implemented encodings with mb_list_encodings(). In the above code-change we construct a string suitable for mb_detect_encoding with the implode function.

Believe it or not (better try it): Without the modification, the text-editor does not display Windows-ANSI files correctly, with the modification, it does ;-)

It also recognizes UTF with BOM and without BOM and all other encodings!

Best wishes
Stefan Hammes