Skip to content
Jens Möckel edited this page Nov 16, 2015 · 3 revisions

Since the release of Modelica 3.2 it is allowed to use arbitrary Unicode characters (e.g. ° ß ü ä ö ° ² ³ µ @) in comments, description strings and/or annotations, see https://modelica.org/news_items/release_of_modelica_3_2

Regarding the encoding of .mo files there are now two possibilities:

  • Do not use arbitrary Unicode characters and save the file as 7-bit ASCII
  • Use arbitrary Unicode characters in comments or description strings and save the file as UTF8.

Unfortunately, the second option has some problems, see http://stackoverflow.com/q/30372814/874701.
So just using 7-bit ASCII is the safer option.

OpenModelica checks the encoding of the files when opening the library, so it is always a good idea to open the code in OpenModelica before merging to the master branch. See https://trac.openmodelica.org/OpenModelica/wiki/WritingCompliantLibraries for more infos.

Clone this wiki locally