unicode - MonoTouch Comparing Strings -
I have an app that lists many languages. In the app I compare language names.
When I do not compare the names of languages with any accent, it works and its comparison is correct.
When I compare languages with accents, it does not seem that they are equal.
In this case they are not equal (but must be).
language = "español"; MonoTouch.Foundation.NSString s = New MonoTouch.Foundation.NSString (language); MonoTouch.Foundation.NSString = New MonoTouch.Foundation.NSString ("Español");
In this example, they are equal (notice not accent).
language = "Deutsch"; MonoTouch.Foundation.NSString s = New MonoTouch.Foundation.NSString (language); MonoTouch.Foundation.NSString = New MonoTouch.Foundation.NSString ("Deutsch");
I have tried the cultures, no benefit.
Am I missing some basic point here?
I am using MonoTouch 1.4.4 >
The following matches like you Ignoring the accent:
var language = "español"; MonoTouch.Foundation.NSString s = New MonoTouch.Foundation.NSString (language); MonoTouch.Foundation.NSString = New MonoTouch.Foundation.NSString ("Español"); Favored Results = String.Contact (S, L, Culture Infoc. Contentculture, comparison operation. Ignoran Space);
Comments
Post a Comment