https://bugzilla.novell.com/show_bug.cgi?id=677823

https://bugzilla.novell.com/show_bug.cgi?id=677823#c0


           Summary: Cannot create culture-insensitive regular expressions
    Classification: Mono
           Product: MonoTouch
           Version: unspecified
          Platform: iPhone
        OS/Version: Apple iOS 4.2
            Status: NEW
          Severity: Major
          Priority: P5 - None
         Component: Class Libraries
        AssignedTo: [email protected]
        ReportedBy: [email protected]
         QAContact: [email protected]
          Found By: Customer
           Blocker: Yes


Description of Problem:

I have a problem with regular expressions in my MonoTouch application. It
appears that RegexOptions.CultureInvariant is ignored, and expressions are
always evaluated using the device default culture.

Steps to reproduce the problem:

1. Set the region format to 'Turkey(Turkish)' (in Settings - General -
International).
2. Run the code below:
//-----
Regex rx_I = new Regex(@"II", RegexOptions.IgnoreCase |
RegexOptions.CultureInvariant);
Regex rx_i = new Regex(@"ii", RegexOptions.IgnoreCase |
RegexOptions.CultureInvariant);

string aString = "Ii";

Match match;

match=rx_I.Match(aString);
if(match.Success){
    Console.WriteLine(match.Value);
}

match=rx_i.Match(aString);
if(match.Success){
    Console.WriteLine(match.Value);
}
//-----


Actual Results:
Both matches are not successful if the region format is set to Turkey.


Expected Results:
Both matches should be successful regardless of the device region format.


How often does this happen? 
Always

Additional Information:
The problem is reproducible both in simulator and on real devices (tested with
iPad/iPhone 4/iPod Touch running iOS 4.2.1; MonoTouch version is 3.2.4).

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to