Changes between Version 3 and Version 4 of WritingCompliantLibraries
- Timestamp:
- 2013-06-14T07:42:37Z (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WritingCompliantLibraries
v3 v4 3 3 4 4 === Graphical annotations === 5 OMEdit was written after Modelica 3 was introduced. Because of this, it has no support for Modelica 1 or 2-style graphical annotations. If you want OMEdit to be able to browse your library, you will need to use a tool that knows how to convert these annotations; for example the Dymola demo version. 5 OMEdit was written after Modelica 3 was introduced. Because of this, it has no support for Modelica 1 or 2-style graphical annotations. If you want OMEdit to be able to browse your library, you will need to use a tool that knows how to convert these annotations; for example the Dymola demo version. Import the library and 6 export it choosing Modelica 3 graphical annotations. 6 7 7 8 === File encoding === 8 9 Make sure that the library is encoded in UTF-8 or 7-bit ASCII. It is not UTF-8 encoded if OpenModelica says: 9 10 > Error: The file was not encoded in UTF-8 10 To solve this, convert the files to UTF-8, or manually modify the sources. To manually change the encoding of a file, open it in a text editor (such as pluma or Notepad++) and make sure each character looks the way it should, then save as UTF-8 text. To automatically convert all sources if you know the current encoding you can use this(Unix only):11 To solve this, convert the files to UTF-8, e.g., opening it in OMEdit and clicking on the button to convert to UTF-8, or manually modify the sources. To manually change the encoding of a file, open it in a text editor (such as pluma or Notepad++) and make sure each character looks the way it should, then save as UTF-8 text. To automatically convert all sources if you know the current encoding you can use the following script (Unix only): 11 12 {{{ 12 13 find $(SOURCE_DIRS) -regextype posix-egrep -regex '.*\.(cpp|c|h|mo|tpl)$$' -exec bash -c "iconv -f UTF-8 -t UTF-8 '{}' -o /dev/null 2>tmp || (rm -f tmp && cp '{}' tmp && iconv -f ISO-8859-1 -t UTF-8 tmp -o '{}' && echo Converted {} to UTF-8)" ';'