joltup / rn-fetch-blob

A project committed to making file access and data transfer easier, efficient for React Native developers.
MIT License
2.84k stars 784 forks source link

fixing dotless i (0x131) problem #762

Closed eczmustafa closed 2 years ago

eczmustafa commented 2 years ago

a temporary workaround about the issue https://github.com/joltup/rn-fetch-blob/issues/573

halaei commented 2 years ago

Your change only fixes one case. The correct way is toLowerCase(Locale.ENGLISH) or toLowerCase(Locale.ROOT) Please also consider sending your PR to https://github.com/RonRadtke/react-native-blob-util

eczmustafa commented 2 years ago

thank you for the new link. toLowerCase(Locale.ENGLISH) should work in theory and this is the professinal way of doing it. yes you right. however, this issue needs to be resolved, ihmo, by manually replacing dotless i (0x131), unfortunately.

On a linux pc these lines give same results: String txt="ŞĞÜİI"; System.out.println("Locale.ENGLISH: " + txt.toLowerCase(Locale.ENGLISH)); System.out.println("Locale.ROOT: " + txt.toLowerCase(Locale.ROOT)); System.out.println("tr-TR: " + txt.toLowerCase(new Locale("tr-TR"))); System.out.println("default: " + txt.toLowerCase());

Output: Locale.ENGLISH: şğüi̇i Locale.ROOT: şğüi̇i tr-TR: şğüi̇i default: şğüi̇i

I don't have opportunity to test on Android.