Well, all of my available versions of IE translate Μάρτιος always to ΜΆΡΤΙΟς , even when using .toUpperCase() .
I assume the problem is variations on some letters ( http://de.wikipedia.org/wiki/Griechisches_Alphabet#Klassische_Zeichen ).
For example, the letters Σ σ Σ and ς are all “sigma”. The first are classic, the others are options. Another example would be Β, β and β for "Beta".
To make sure that these options are recognized, I recommend spoofing before creating a regular expression.
Here I made a short (possibly incomplete) helper function to do this
function regextendVariants(s) { var variants = [ ['β', 'ϐ'], ['ε', 'ϵ'], ['θ', 'ϑ'], ['κ', 'ϰ'], ['π', 'ϖ'], ['ρ', 'ϱ'], ['σ', 'Ϲ', 'ς'], ['φ', 'ϕ'] ]; for (var j = 0; j < variants.length; j++) { var variant = variants[j]; for (var k = 1; k < variant.length; k++) { s = s.replace(variant[k], '['+variant.join('')+']'); } } return s; }
This function converts your strings to
- Μάρτιο [σΣς]
- Μάιο [σΣς]
- Ιούνιο [σΣς]
- Ιούλιο [σΣς]
- Αύγουστο [σΣς]
- Νοέμβριο [σΣς]
These lines allow you to use different variants of the same letter. I'm sure this is grammatically incorrect, but it needs to be more durable to fit the lines.
In your code you have to replace
var r = new RegExp(m, 'i');
from
var r = new RegExp(regextendVariants(m), 'i');
As I said, my versions of IE do not make a mistake, so I can not promise you that this will be the final solution to your problem, I hope it will;)