- Index
- » Developer
- » OpenModelica development
- » ModelicaML file encoding issue?
ModelicaML file encoding issue?
ModelicaML file encoding issue?
after installing OpenModelica 1.8.1 r11643 the compiler suddenly started refusing to load the code generated by ModelicaML (i am using 1.8.8). the model execution report contains
<error_report>
Simulation failed for:
- MModel.Design.Test
************************** LOG ************************
checkModel: "Unknown model in checkModel: MModel.Design.Test
"
ErrorString: ""
</error_report>
the problem seems to be that the files generated by my ModelicaML are in "Cp1252" encoding (can that be changed through eclipse's configuration interface?) and the omc has recently been modified to enforce the Modelica specification that files must be UTF-8.
my workaround solution is to create a file <eclipse_project_root>\<model_name>\code-gen\package.encoding by hand, which simply contains the text "Cp1252".
i noticed that the latest nightly build of OpenModelica now only issues warnings if the encoding is wrong. however, i believe in the long run ModelicaML should implement a solution, whether that involves generating a package.encoding file, or perhaps by forcing the encoding to be UTF-8.
Re: ModelicaML file encoding issue?
Hi,
thanks for pointing this out.
Have you tried to adjust your Eclipse Preferenes (Window->Preferences->General->Workspace->Text file encoding -> UTF-8)?
Wladimir
- wladimir
- 37 Posts
Re: ModelicaML file encoding issue?
Ok, I see. We will adress this issue soon when migrating to the new Acceleo framework for Modelica code generation.
In the mean time I implemented the generation of package.encoding file for the top-level package.mo (following your suggestion).
The update wil be available tomorrow.
Wladimir
- wladimir
- 37 Posts
- Index
- » Developer
- » OpenModelica development
- » ModelicaML file encoding issue?