Android或Firebase未检测到á;
当我尝试从firebase下载pdf文件时,我遇到了这个问题,我认为firebase或Android没有检测到重音字符,例如(í,á),但它没有;不要和ó一起发生,只和其他人一起发生Android或Firebase未检测到á;,android,firebase,firebase-realtime-database,firebase-storage,Android,Firebase,Firebase Realtime Database,Firebase Storage,当我尝试从firebase下载pdf文件时,我遇到了这个问题,我认为firebase或Android没有检测到重音字符,例如(í,á),但它没有;不要和ó一起发生,只和其他人一起发生 我用FixBASE做了一些简单的事情,我从我的桶中下载了PDF文件,我在实时数据库中有一些数据,比如PARA.CeleSIS.pdf,是从FialBaseTraseMy文件中得到的一个参考数据: mybucket/Paráclesis.pdf 因此,如果我试图用í,á下载一个文件(用ó则不会发生),就会出现问题。我
我用FixBASE做了一些简单的事情,我从我的桶中下载了PDF文件,我在实时数据库中有一些数据,比如PARA.CeleSIS.pdf,是从FialBaseTraseMy文件中得到的一个参考数据: mybucket/Paráclesis.pdf
因此,如果我试图用í,á下载一个文件(用ó则不会发生),就会出现问题。我得到这个错误: com.google.firebase.storage.StorageException:位置不存在对象 我尝试使用:URLEncoder.encode(str, "UTF-8"); //nothing i get the same
try {
byte[] utf8Bytes = fileName.getBytes("UTF-8");
fileName = new String(utf8Bytes, "UTF-8");
Log.d(TAG_DEBUG, "fileName "+ fileName);
}
还有其他方法试图对我的文件名或任何可能对我有帮助的东西进行编码,但我总是会遇到同样的错误
我看到了这个链接,但它是针对ios的
在ios中使用此代码
self.storageRef = FIRStorage.storage().reference().child("\(self.selectedOpciones_name)/\(self.selectedHeaderOpciones)")
let decomposedPath = ("\(self.selectedPDFTitle).pdf").decomposedStringWithCanonicalMapping // Unicode Form D
self.storageRef.child(decomposedPath).downloadURLWithCompletion{ (URL, error)
但在安卓系统中,我不知道如何才能做到这一点
Normalizer
.normalize(fileName, Normalizer.Form.NFD);
(NSString*)分解的StringWithCanonicalMapping字符串
相当于Java/Android中的NFD有同样的问题,你有没有解决过?