Changes between Version 2 and Version 3 of WritingCompliantLibraries
- Timestamp:
- 2013-06-11T06:08:46Z (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WritingCompliantLibraries
v2 v3 8 8 Make sure that the library is encoded in UTF-8 or 7-bit ASCII. It is not UTF-8 encoded if OpenModelica says: 9 9 > 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 automatically convert all sources if you know the current encoding you can use this (Linux only):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 11 {{{ 12 12 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)" ';' 13 13 }}} 14 To manually convert to 7-bit ASCII (as used by the MSL), use HTML entities. For example: `"°C"` becomes `"<html>°C</html>"` and `<html>Linköping</html>` becomes `<html>Linköping</html>` 14 To manually convert to 7-bit ASCII (as used by the MSL), use HTML entities. For example: `"°C"` becomes `"<html>°C</html>"` and `<html>Linköping</html>` becomes `<html>Linköping</html>`. 15 16 === Wrong package.order === 17 18 When in doubt, remove all package.order files. If they are present, they must follow a certain structure. OpenModelica will give nice warnings about what is missing or superfluous. Sometimes, these errors are due to Modelica being case-sensitive. 15 19 16 20 === Modelica is case-sensitive === … … 25 29 To automatically add within-clauses to a library, there exists a utility in our [https://openmodelica.org/git/OpenModelicaLibraries.git git] repository: addMissingWithin.sh. 26 30 27 === Common parsing errors ===31 === Incorrect floating point numbers === 28 32 29 33 > Warning: Treating .5 as 0.5. This is not standard Modelica and only done for compatibility with old code. Support for this feature may be removed in the future.