本人先在 终端设备的 /mnt/flash/aa/你好/啊啊 创建好了文件夹,
代码里面
String filepath = "/mnt/flash/aa/你好/啊啊/";
File f=new File(filepath);
if (f.exists()) {
System.out.println(f+ " is existed.");
} else {
System.out.println(f+ " not is existed");
f.mkdirs();
}
运行后log 显示" not is existed ",而重新 创建了 乱码的文件目录。
这是什么原因呢?希望高手指点,谢谢!
------解决方案--------------------
编码
回复内容太短了!
------解决方案--------------------
中文要考虑编码的问题啊
------解决方案--------------------
楼上都是正解,编码问题,中文的还是用string引用吧
android编码规范是代码中不要有中文的