FaqMultiByteInRubyProjects

Are there limitations on the use of multibyte or extended ASCII in NetBeans Ruby and Rails?

There are limitations on the use of multibyte or extended ASCII in the Ruby and Rails supported by the Netbeans IDE. The NetBeans IDE itself does not prohibit the use of multibyte in Ruby or Rails project and file names, and in file contents where it could be data or values.

However, in general, Ruby and Rails do not support the use of extended ASCII or multibyte. This can be seen by doing Ruby or Rails commands or operations from the command line outside of the NetBeans IDE.

Some guidelines for Ruby:

  • Ruby identifiers consist of a-z, A-Z, 0-9, abd _ (English basic alphabetic characters, decimal digits, and the underscore character)
  • Ruby class name and module names are constants. They should begin with upper case letters (A-Z).

Since NetBeans file and project names are used as the basis for names of Ruby and Rails files that will be processed by the Ruby and Rails compiler and other programs, the use of multibyte and extended ASCII in Ruby and Rails project and file names and contents should be avoided.

During the creation of a NetBeans Ruby or Rails project or file, a check is done to see if a Ruby name is "safe" (a-z, A-Z, 0-9, or _); if not, the IDE generates warnings (but not errors) in the Create Project dialog box (for Ruby and Rails projects), in the New File dialog box (for classes, modules, tests), and in the Rename Refactoring "new name" dialog box.

In summary, use the safe characters mentioned above in names of NetBeans Ruby and Rails project, files, class, variables, methods, controllers, and other parts. This includes creating tests and generating rdocs.

Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo