This is preliminary, all tests pass, but needs more careful review.
Test data provided by Unicode organisation