Changes between Version 3 and Version 4 of WritingCompliantLibraries


Ignore:
Timestamp:
2013-06-14T09:42:37+02:00 (11 years ago)
Author:
petfr
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WritingCompliantLibraries

    v3 v4  
    33
    44=== 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.
     5OMEdit 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
     6export it choosing Modelica 3 graphical annotations.
    67
    78=== File encoding ===
    89Make sure that the library is encoded in UTF-8 or 7-bit ASCII. It is not UTF-8 encoded if OpenModelica says:
    910> 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):
     11To 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):
    1112{{{
    1213find $(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)" ';'