Loading ...
Sorry, an error occurred while loading the content.

1435Re: Unicode and JSLint

Expand Messages
  • Douglas Crockford
    Aug 23, 2010
    • 0 Attachment
      --- In jslint_com@yahoogroups.com, "abyssoft@..." <abyssoft@...> wrote:
      >
      > As Described in ECMA-262 3rd Edition JSLint fails to support Rules for Variable names as laid out in section 7.3 on page 14-15 where...
      >
      > Identifier ::
      > IdentifierName but not ReservedWord
      >
      > IdentifierName ::
      > IdentifierStart
      > IdentifierName IdentifierPart
      >
      > IdentifierStart ::
      > UnicodeLetter
      > $
      > _
      > \ UnicodeEscapeSequence
      >
      > IdentifierPart ::
      > IdentifierStart
      > UnicodeCombiningMark
      > UnicodeDigit
      > UnicodeConnectorPunctuation
      > \ UnicodeEscapeSequence
      >
      > UnicodeLetter
      > any character in the Unicode categories "Uppercase letter (Lu)", "Lowercase letter (Ll)", "Titlecase letter (Lt)",
      > "Modifier letter (Lm)", "Other letter (Lo)", or "Letter number (Nl)".
      > UnicodeCombiningMark
      > any character in the Unicode categories "Non-spacing mark (Mn)" or "Combining spacing mark (Mc)"
      > UnicodeDigit
      > any character in the Unicode category "Decimal number (Nd)"
      > UnicodeConnectorPunctuation
      > any character in the Unicode category "Connector punctuation (Pc)"
      > UnicodeEscapeSequence
      > see 7.8.4.
      >
      > fails to support any or \ UnicodeEscapeSequence, UnicodeLetter, UnicodeCombiningMark when present in identifier names.
      > while for English these may not be the most desired, it should still be support as it is legitimate and in for those who are non english speakers usage of unicode characters would be normal to reflect their language.


      It isn't a matter of legitimacy, it is a matter of portability. I have not found that the forms you are demanding are actually used in the wild except by crackers. If you want your program to be useful to the greatest number of people, you should, perhaps regrettably, stick with the ASCII set of lower case letters for variables names.
    • Show all 5 messages in this topic