Tk Library Source Code

View Ticket
Login
Ticket UUID: 2890065
Title: Stringprep fixes (bidi and folding)
Type: Patch Version: None
Submitter: teopetuk Created on: 2009-10-31 20:07:48
Subsystem: stringprep Assigned To: patthoyts
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2009-11-02 23:17:26
Resolution: Accepted Closed By: patthoyts
    Closed on: 2009-11-02 00:18:53
Description:
Hi!

I'd like to propose three fixes for the stringprep module:

1) There was a bug in prohibited_bidi procedure (variable $first_bidi was never assigned and $have_l calculated incorrectly - it should cumulatively set to 1 if there are left-to-right characters in a string).
2) The script tools/gen_stringprep_data.tcl failed to process one folding case (for character U+33C6) in table B.2 because it couldn't process mapping to 4 symbols (only up to 3).
3) (trivial bug) In register procedure -prohibit is a number but it was initialized as an empty string.

The attached patch fixes these bugs and contains diff  for regenerated stringprep_data.tcl

The patch also includes fixes to three failed tests (bugs 1897839, 1897841, 1897843): tests for failed bidi are passed now if their results are changed from invalid_bidi to prohibited_bidi (as in stringprep::stringprep). Test for nameprep can't be fixed because it contains symbol U+1D7BB which can't be represented in Tcl, so I left this test as is (with knownBug status) and added another one without U+1D7BB.
User Comments: patthoyts added on 2009-11-02 07:18:53:

allow_comments - 1

patthoyts added on 2009-11-02 07:18:49:
Applied patch. Thank you.

teopetuk added on 2009-11-01 03:07:50:

File Added - 349010: stringprep.diff

Attachments: