National Language Support

National Language Support is implemented according to the below description. You can, for example, use Japanese characters in comments and documentation.

Modelica Language supports Unicode (UTF-8) for comments and annotations, but not for identifiers and string constants. The Dymola Behavior Modeling app fully supports this, and furthermore, to use scripting with file names in Unicode, all string constants can contain Unicode characters.

(See the Modelica Language Specification for more information concerning the Modelica standard. You can find it here.)

In particular concerning Unicode in reading and writing files, the following script files are supported in Dymola Behavior Modeling:

  • Modelica .mos script files in UTF-8.
    Note: A leading byte-order-mark is required.
  • .mos script files in UTF-16.
    Note: A leading byte-order-mark is required.
  • Writing other files (encrypting Modelica files, and HTML generation).

The reason for requiring a leading byte-order-mark in the files for UTF-8 and UTF-16 is that the Modelica Standard Library and other libraries developed in Europe have European character for degree sign and diacritical characters that are outside of ASCII.

When Modelica .mos scripts are created in the Dymola Behavior Modeling app, they are automatically created using UTF-16 encoding if non-ASCII characters are present, otherwise using ASCII.

Creating and saving Modelica .mos scripts using MS Notepad, a file containing non-ASCII characters must be saved using UTF-8 coding.