Context rules

Mark Davis mark at
Tue Mar 31 22:14:33 CEST 2009

Friday, I transformed the rules in tables into a set of machine-readable
expressions, added all the provisions in bidi, and wrote code to implement
and test them. I later added the protocol rules as well, so it does a
complete test of U-Label except for the Punycode length. Comments welcome -
especially more test cases!

Rules at:
(caveats: I focussed on the hard ones - there are also a number that I don't
think belong, and didn't do them initially)

Log of running the test at:
(in verbose mode, shows parse of the rules, and results of the test.)

Test cases at:
(I tried to get a couple of invalid and a couple of valid, for each
character. Needs huge expansion, along the lines of

Code at:
(caveats; just wrote it out simply, no documentation; test code is just in
the main() method. Note that when a label is disallowed, the test returns
the first character that causes that, plus the rule responsible.)

-------------- next part --------------
An HTML attachment was scrubbed...

More information about the Idna-update mailing list