Context rules

Mark Davis mark at macchiato.com
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:
http://unicode.org/cldr/data/tools/java/org/unicode/cldr/draft/idnaContextRules.txt
(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:
http://unicode.org/cldr/data/tools/java/org/unicode/cldr/draft/idnaTestLog.txt
(in verbose mode, shows parse of the rules, and results of the test.)

Test cases at:
http://unicode.org/cldr/data/tools/java/org/unicode/cldr/draft/idnaTestCases.txt
(I tried to get a couple of invalid and a couple of valid, for each
character. Needs huge expansion, along the lines of
http://www.unicode.org/Public/UNIDATA/NormalizationTest.txt)

Code at:
http://unicode.org/cldr/data/tools/java/org/unicode/cldr/draft/IdnaLabelTester.java
(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.)

Mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.alvestrand.no/pipermail/idna-update/attachments/20090331/264b446a/attachment.htm 


More information about the Idna-update mailing list