0x01
Eclipse可以智能的把UTF-8+BOM文件转为普通的UTF-8文件,Android Studio还没有这个功能,所以使用Android Studio编译UTF-8+BOM编码的文件时会出现” 非法字符: ‘\ufeff’ “之类的错误。
解决办法可以通过其他编辑器另存为UTF-8文件。但是太麻烦,这里使用的办法是使用python脚本全自动实现。
0x02
1 | import os, sys, codecs |
I'm so cute. Please give me money.
- Post link: http://zy.hn/2016/04/26/android-studio-ufeff/
- Copyright Notice: All articles in this blog are licensed under unless stating additionally.