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 Modelica Language Specification Version 3.2 for more information concerning the Modelica standard.) In particular concerning Unicode in reading/writing files, the following script files are supported in Dymola Behavior Modeling:
The reason for requiring a leading byte-order-mark in the files for UTF-8 and UTF-16 is that 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. |