This doesn't happen when I copy from a windows device, so I was wondering if there is a fix for this?
I noticed that some codes or even formats look different in Android encoding. Perhaps the reason for this is Unicode Transformation Format UTF-32. I am not completely sure of the cause of the error, but why not use a third-party service to host the code and then post the link here, I suggest you --->
https://pastebin.com/Can you add a link to the code you mean?