Skip to content

Fix for Dotless i Problem on Android #103

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

eczmustafa
Copy link

.toLowerCase() function on an Android system with Turkish language causes a bug.

Please see: joltup#573

Error message starts with "Error RNFetchBlob request error: Unexpected char 0x131 at ...". -> 0x131 is ı (dotless i).

.toLowerCase() function works and does its job in a correct way. However, dotless i and normal i aren't considered equal, naturally.

Only workaround, as far as i can find out, is this.

.toLowerCase() function on an Android system with Turkish language causes a bug.

Please see: joltup#573

Error message starts with "Error RNFetchBlob request error: Unexpected char 0x131 at ...". -> 0x131 is ı (dotless i).

.toLowerCase() function works and does its job in a correct way. However, dotless i and normal i aren't considered equal, naturally.

Only workaround, as far as i can find out, is this.
@halaei
Copy link

halaei commented Jan 26, 2022

Hello @eczmustafa
Continuing our conversation from joltup#762, I think your examples doesn't apply to the original issue. We are not supposed to assign headers with non-ascii characters to an http request. So the fact that ŞĞÜİI becomes şğüi̇i even with English locale isn't relevant. The important thing is that a valid English header like X-MOBILE-APP-VERSION should not be converted to x-mobıle-app-versıon.
So still the correct fix is setting the locale, e.g. toLowerCase(Locale.ROOT).
Also note that there are many other calls to toLowerCase() in this library and probably they need to be addressed as well.

@RonRadtke
Copy link
Owner

I implemented the fix metioned on the old repository by using the Locale.ROOT. Thus I'm closing the PR.

@RonRadtke RonRadtke closed this Mar 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants