2
I have several files in UTF-8 with BOM(Byte-Order-Mark) and I want to remove several at once. The need is that I have an Android project created in Eclipse and need to perform a migration to Android Studio. The IDE accuses these characters below in the classes:
ï »¿
It is giving thousands of errors, because the project contains nothing less than basically 532 classes. To perform this procedure in Android Studio version 3, it is simple, but it is a very hard job, for having to do file by file. Just go on File > Remove BOM
. See below:
What would be the most practical way to solve this? How to remove the GOOD (Byte-Order-Mark) of multiple UTF-8 files?
I don’t know any way by android studio to solve this problem. But depending on the Operating System you are using, you can build a script that automates the process for all files in a folder.
– Murillo Comino
I tested that project for Windows, but there is it for Mac and Linux. For me it worked perfectly. I put the program in the root folder where I wanted to remove all BOM’s and opened it. It runs the program to root folder and subfolders. If you’re going to use, don’t forget to back up your project first.
– Murillo Comino