[Unicode]   Common Locale Data Repository : Bug Tracking Home | Site Map | Search
 
Modify

CLDR Ticket #10025(new unknown)

Opened 6 months ago

Last modified 6 months ago

Add explicit lists of syntax characters

Reported by: mark Owned by: anybody
Component: unknown Data Locale:
Phase: dsub Review:
Weeks: Data Xpath:
Xref:

Description (last modified by mark) (diff)

For each of the complex syntaxes, document the exact set of characters that need to be escaped.

Eg:

Requires Escaping: [[:Pattern_White_Space:][\&\[\]#@!<;,=*]]

Start with

http://www.unicode.org/reports/tr35/tr35-collation.html#Rules

Then hand off to others for

RBNF,
Transforms,
Dates
Numbers
...

Notes


Even better would be to put this into the supplemental CLDR data — the amount of data would be small.


I got the above "Requires" for Collation from the following. Not sure if it is complete, or if we want to add more reserved syntax characters.

CollationRuleParser

  • parse
  • parseRelationOperator

PatternProps

  • isWhiteSpace

One purpose is so that people who don't know the fine details of the rules can still know what are the syntactically relevant characters, for code like:

    static final UnicodeSet NEEDS_QUOTE = new UnicodeSet("[[:Pattern_White_Space:][\\&\\[\\]#@!<;,=*]]").freeze();
    
    private String quoteSyntax(String source) {
    	return NEEDS_QUOTE.containsNone(source) ? source :
    		"'" + source.replace("'", "''") + "'";
    }

Attachments

Change History

comment:1 Changed 6 months ago by mark

  • Description modified (diff)

comment:2 Changed 6 months ago by mark

  • Description modified (diff)
View

Add a comment

Modify Ticket

Action
as new
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.