Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

The file was not encoded in UTF-8

The file was not encoded in UTF-8

I am new to OpenModelica, and as an exercise downloaded the MotorCycleDynamics Library from Modelica.org (The file was not encoded in UTF-8)  Trying to load this in OMEdit 1.8.1 under Windows resulted in an error saying "The File was not encoded in UTF-8"  There were two more messages:

  To change encoding when loading a file: loadFile(encoding="ISO-XXXX-YY").
  To change it in a package: add a file package.encoding at the top-level.

The library is from 2006 and it says on Modelica.org that it has been tested in Dymola.  However, is there a way to convert the library or load library's not UTF-8 encoded?

Re: The file was not encoded in UTF-8

Hi,

I converted the library to UTF-8 and Modelica 3.x with Modelica 3.x graphical annotations.
You can get it here: https://trac.openmodelica.org/OpenModel … leDynamics
(use Download in other formats: Zip Archive).

However even if you can load it into OMEdit (OpenModelica connection editor) simulating it is another story.
You would need to modify the library quite a bit so that you can simulate any of the Examples.

Cheers,
Adrian Pop/

Re: The file was not encoded in UTF-8

Adrian,

Thank you, that loads now.  In the future, is a way for me to convert older libraries to UTF-8 and Modelica 3.x?

Re: The file was not encoded in UTF-8

You can use any file encoding convert utility like iconv to make your libraries UTF-8.
To convert them to Modelica 3.x you can use Dymola or either do it manually.

Adeel.

There are 0 guests and 0 other users also viewing this topic
You are here: