1

I need to list all characters from the categories ID Start and ID Continue in Unicode. Where could I do that for a specific version of Unicode (in this case, Unicode 5)?

I think the site https://codepoints.net doesn't allow doing this for specific Unicode version.

2

As per Unicode® Standard Annex #31 (Unicode identifier and pattern syntax), ID_Start and ID_Continue character categories are derived from the Unicode General_Category (read whole UnicodeData File Format and Unicode character database articles).

See Table 2. Properties for Lexical Classes for Identifiers (digest of):

  • ID_Start characters are derived from the Unicode General_Category of uppercase letters, lowercase letters, titlecase letters, modifier letters, other letters, letter numbers, plus Other_ID_Start, minus Pattern_Syntax and Pattern_White_Space code points.

    • In set notation:
    • [[:L:][:Nl:][:Other_ID_Start:]--[:Pattern_Syntax:]--[:Pattern_White_Space:]]
  • ID_Continue characters include ID_Start characters, plus characters having the Unicode General_Category of nonspacing marks, spacing combining marks, decimal number, connector punctuation, plus Other_ID_Continue , minus Pattern_Syntax and Pattern_White_Space code points.

    • In set notation:
    • [[:ID_Start:][:Mn:][:Mc:][:Nd:][:Pc:][:Other_ID_Continue:]--[:Pattern_Syntax:]--[:Pattern_White_Space:]]

We can see reference to Other_ID_Start, Other_ID_Continue, Pattern_Syntax and Pattern_White_Space here; for instance:

The exact list of characters covered by the Other_ID_Start and Other_ID_Continue properties depends on the version of Unicode. For more information, see Unicode Standard Annex #44, “Unicode Character Database” [UAX44].

Parse UnicodeData.txt, apply valid regex(es) created from above set notation. Apply to proper version of UnicodeData.txt, browsing from Index of /Public.

 http://unicode.org/Public/5.0.0/ucd/UnicodeData.txt
                           ↑ ↑ ↑
| improve this answer | |
  • Very much thanks thanks, I think with your help I'm able to get the code points for ID_START and ID_CONTINUE, I'll also try to fit it with ECMAScript 4... – Hydroper Apr 1 '17 at 10:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.