Does Capacitor writeFIle only write strings to txt files?

Solved:
Remove the encoding parameter.
See: