-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
ToUpper not working as intended with Turkish Culture #77689
Comments
Hi @sencagri , did you try any other platforms besides Android, and does it work on those? |
Related: dotnet/android#5425 |
Reproduced this on Android; tried it on a Windows MAUI project and it works fine. |
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process. |
You can probably move this to dotnet/runtime since it's likely in their part of the stack. |
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
Windows works fine |
Is this really related? I have tested both Xamarin.Forms and Xamarin.Android project, they are working fine. |
Tagging subscribers to this area: @dotnet/area-system-globalization Issue DetailsDescriptionIn our tests ToUpper() method returns false characters. The lowercase "i" character should be "İ" but we are getting "I" only in .NET MAUI apps. Other project types are working fine. Steps to Reproduce
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance); // don't know if this helps, just tried...
CultureInfo tr = new CultureInfo("tr-TR", false);
string test = "i";
var test2 = test.ToUpper(tr);
var testResult = test2 == "İ"; // result is false because test2 is "I" instead of "İ" Link to public reproduction project repositoryhttps://github.com/sencagri/MauiAppToUpper Version with bug7.0 Release Candidate 2 Last version that worked wellUnknown/Other Affected platformsAndroid Affected platform versionsAll android versions Did you find any workaround?No response Relevant log outputNo response
|
@marek-safar could you get someone look at this as it is mono runtime? |
@sencagri just fyi, upper and lower casing strings have nothing to do with the Encoding. doing Encoding.RegisterProvider(CodePagesEncodingProvider.Instance); // don't know if this helps, just tried... is not needed anyway. |
Tagging subscribers to 'arch-android': @steveisok, @akoeplinger Issue DetailsDescriptionIn our tests ToUpper() method returns false characters. The lowercase "i" character should be "İ" but we are getting "I" only in .NET MAUI apps. Other project types are working fine. Steps to Reproduce
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance); // don't know if this helps, just tried...
CultureInfo tr = new CultureInfo("tr-TR", false);
string test = "i";
var test2 = test.ToUpper(tr);
var testResult = test2 == "İ"; // result is false because test2 is "I" instead of "İ" Link to public reproduction project repositoryhttps://github.com/sencagri/MauiAppToUpper Version with bug7.0 Release Candidate 2 Last version that worked wellUnknown/Other Affected platformsAndroid Affected platform versionsAll android versions Did you find any workaround?No response Relevant log outputNo response
|
@steveisok please prioritize |
I'm not sure there's a whole lot we can do here as we are fully relying on the version of ICU that is packaged with Android. We are going to experiment on a few ideas and see if they make a difference. |
What version of Xamarin.Android is it succeeding in? We can't get a single test run to pass testing
|
Hi, |
There's unfortunately not a lot we can do to control this behavior since we are relying on Android ICU. We had originally wanted to ship our own like we do for iOS, but we didn't want to take on a few dependencies. |
Relying on it how? What's the mechanism? |
The entire globalization interop calls into ICU functions. In the case of Android, it's the one they ship. |
Any kind of workaround? |
You'd have to include your own copies of the ICU libraries, essentially (as @steveisok mentioned). There are some relatively simple instructions for including them for your application. They only specifically list Windows/Linux (ie, intending it to be server/desktop applications), though, so I don't know how it would go for Android. Keep in mind that if you go that route, you will have to make sure to update and distribute your application regularly to account for ICU updates, which is multiple times a year. That said, in at least some cases some of the Turkish characters might be created via combining characters. Have you checked the actual length of the string and characters actually present? |
So presumably there's a bug in the functions they ship, and at some point in the future they'll fix it and Is it a known bug? Is it being tracked? |
More likely there's something up with their data tables (there's two parts to ICU - a set of functions, and a set of data tables)
I doubt it. |
Description
In our tests ToUpper() method returns false characters. The lowercase "i" character should be "İ" but we are getting "I" only in .NET MAUI apps. Other project types are working fine.
Steps to Reproduce
Link to public reproduction project repository
https://github.com/sencagri/MauiAppToUpper
Version with bug
7.0 Release Candidate 2
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
All android versions
Did you find any workaround?
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered: