1

We have HTML form which will allow french alphabets. So we have added validation to check only alphabets and not numbers. We have used regular expression to achieve this using javascript validation. I have pasted the regex code below for reference.

I have used below options to check alphabets that include french alphabets

[^A-Za-zA-ÿ\\s]

[^A-ÿ\\s]

It works fine in all modern browsers. But in ie6 it is not working.

In IE6 i got below error message: "Invalid range in character set"

Is there any other solution to fix the above problem. Also please let me know if u need any other details.

alain.janinm
  • 19,951
  • 10
  • 65
  • 112
Srinivasan
  • 433
  • 3
  • 8
  • 20
  • 1
    I'll second @Xeon06 Considering that the manufacturer does not support it (Microsoft), you should not have to either. It's not the hate on IE, it's more of a version issue. – Duniyadnd Dec 07 '11 at 16:37

3 Answers3

1

"french alphabet" doesn't include all character from A to ÿ but only:

dec  char
128  Ç
129  ü
130  é
131  â
133  à
135  ç
136  ê
137  ë
138  è
140  î
144  É
145  æ
146  Æ
147  ô
150  û
151  ù

These 3 are not in ascii table:

œ
Œ
È
Toto
  • 89,455
  • 62
  • 89
  • 125
1

Detect browser version and write the regex (for user can enter characters only and not numbers) in reverse like [0-9] for ie6.

if ($.browser.msie && $.browser.version.substr(0,1)<7) {
      regex here
}
edorian
  • 38,542
  • 15
  • 125
  • 143
yuva ramanan
  • 68
  • 1
  • 4
0

Don't think you want A through ÿ, as there's a lot of characters in that range, like "÷". Otherwise, I would hope that IE6 supports denoting Unicode characters like so: "ÿ" = \u00FF.

Edit: (Oh wait, you're excluding [A-ÿ]? I'm confused.)

JayC
  • 7,053
  • 2
  • 25
  • 41
  • Iam excluding the other characters which is not in the range. So i have added the condition like that and check that later on. SO for IE6 do we need to convert characters to Unicode and check that. Please let me know. – Srinivasan Dec 08 '11 at 04:54
  • I don't have an XP Virtual Machine set up to test myself, but would seem to concur. – JayC Dec 08 '11 at 13:58