You may receive an "Invalid character" error message when function names and variable names use extended characters in Visual Basic, Scripting Edition and in JScript (259306)



The information in this article applies to:

  • Microsoft Visual Basic, Scripting Edition 1.0
  • Microsoft JScript 5.6
  • Microsoft JScript 5.5
  • Microsoft JScript 5.0
  • Microsoft JScript 4.0
  • Microsoft JScript 3.0
  • Microsoft JScript 2.0
  • Microsoft JScript 1.0

This article was previously published under Q259306

SYMPTOMS

When function names, variable names, and Component Object Model (COM) object names use extended characters, you may receive the following error message from the script parser:
Invalid Character
An example of an extended character is the French "acute e." This problem occurs in Microsoft Visual Basic, Scripting Edition (VBScript) and in Microsoft JScript.

WORKAROUND

To work around this problem, use square brackets around the function name in VBScript. The following is an example:

objectvariable.[functionname]

STATUS

This behavior is by design.

MORE INFORMATION

The workaround complies with the European Computer Manufacturers Association (ECMA) script specification 262. Script specification 262 defines a specific set of characters that you can use.

For additional information about VBScript and JScript, visit the following Microsoft Developer Network (MSDN) Web sites:

Windows script ECMA and ISO/IEC C# and Common Language Infrastructure standards Microsoft JScript features - non-ECMA

Modification Type:MinorLast Reviewed:8/15/2005
Keywords:kbtshoot kbprb KB259306 kbAudDeveloper kbAudITPRO