Open
Description
Description
Attempting to call CultureInfo.InvariantCulture.CompareInfo.IndexOf
with CompareOptions.IgnoreSymbols
throws a PlatformNotSupportedException
(see log output below for full message) on iOS but works fine for Android. This used to work fine in .net 8 MAUI.
CultureInfo.InvariantCulture.CompareInfo.IndexOf("string 1", "strng 2", CompareOptions.IgnoreSymbols) >= 0;
The exception talks about disabling HybridGlobalization
but I cannot find any documentation about this for MAUI.
Steps to Reproduce
- Attempt to call CultureInfo.InvariantCulture.CompareInfo.IndexOf with CompareOptions.IgnoreSymbols
- Note that it throws an exception on iOS
Link to public reproduction project repository
No response
Version with bug
9.0.60 SR6
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
8.0.100 SR10
Affected platforms
iOS
Affected platform versions
No response
Did you find any workaround?
No
Relevant log output
Exception has occurred: CLR/System.Reflection.TargetInvocationException
An unhandled exception of type 'System.Reflection.TargetInvocationException' occurred in Microsoft.iOS.dll: 'Exception has been thrown by the target of an invocation.'
Inner exceptions found, see $exception in variables window for more details.
Innermost exception System.PlatformNotSupportedException : CompareOptions = IgnoreCase, IgnoreNonSpace, IgnoreSymbols are not supported when HybridGlobalization=true on this platform. Disable it to load larger ICU bundle, then use this option.