java - Is it possible to use korean characters as file name in android -
i'am writing simple app learn korean sylabs android os. possible use korean characters file name in android os? when i'am trying file assets dir exception:
07-21 19:33:39.558: w/system.err(7315): java.io.filenotfoundexception: 가.mp3 07-21 19:33:39.558: w/system.err(7315): @ android.content.res.assetmanager.openassetfd(native method) 07-21 19:33:39.558: w/system.err(7315): @ android.content.res.assetmanager.openfd(assetmanager.java:331) 07-21 19:33:39.558: w/system.err(7315): @ net.garagefarm.hangulteatcher.mainactivity$3.onclick(mainactivity.java:141) 07-21 19:33:39.558: w/system.err(7315): @ android.view.view.performclick(view.java:4222) 07-21 19:33:39.558: w/system.err(7315): @ android.view.view$performclick.run(view.java:17273) 07-21 19:33:39.558: w/system.err(7315): @ android.os.handler.handlecallback(handler.java:615) 07-21 19:33:39.558: w/system.err(7315): @ android.os.handler.dispatchmessage(handler.java:92) 07-21 19:33:39.566: w/system.err(7315): @ android.os.looper.loop(looper.java:137) 07-21 19:33:39.566: w/system.err(7315): @ android.app.activitythread.main(activitythread.java:4895) 07-21 19:33:39.566: w/system.err(7315): @ java.lang.reflect.method.invokenative(native method) 07-21 19:33:39.566: w/system.err(7315): @ java.lang.reflect.method.invoke(method.java:511) 07-21 19:33:39.566: w/system.err(7315): @ com.android.internal.os.zygoteinit$methodandargscaller.run(zygoteinit.java:994) 07-21 19:33:39.566: w/system.err(7315): @ com.android.internal.os.zygoteinit.main(zygoteinit.java:761) 07-21 19:33:39.566: w/system.err(7315): @ dalvik.system.nativestart.main(native method) 07-21 19:38:39.495: w/iinputconnectionwrapper(7315): getselectedtext on inactive inputconnection 07-21 19:38:39.495: w/iinputconnectionwrapper(7315): setcomposingtext on inactive inputconnection
what interesting when changed file name "1.mp3" works fine.
here code load file:
num.setonclicklistener(new onclicklistener() { @override public void onclick(view v) { if (player.isplaying()) { player.stop(); } player.release(); player = new mediaplayer(); textview tv = (textview)v; assetmanager manager = parent.getassets(); try { fileinputstream mp3stream = manager.openfd(tv.gettext() + ".mp3").createinputstream(); player.setdatasource( mp3stream.getfd()); player.prepare(); player.start(); } catch (ioexception e) { // todo auto-generated catch block e.printstacktrace(); } matrixselected(tv); } });
from debugger: mtext "가" (id=830041403152)
file name still: 가.mp3
Comments
Post a Comment