Since Modelica 3.2 (released March 2010) it is allowed to use arbitrary Unicode characters in comments, description strings and/or annotations.
But for some reason I am having trouble with code like the following:
within ;
model ENCO_testing "code for investigating Dymola encoding problems"
Real TempC "Temperature in °C";
parameter Real someNumber "description string german üöäß";
Integer greekInt=4 "description string greek αβδεηζμθ";
// a comment with math symbols: °²³~µ
equation
TempC = if greekInt > 3 then someNumber*5 else someNumber/3;
end ENCO_testing;
To reproduce my problems try the following UTF-8 roundtrip:
Can somebody tell me how to save that file in a way that it looks good everywhere? Or am I expecting too much? What has to be fixed and where?
Testing UTF-8 in latest Dymola (Linux), it seems as if Dymola does not change the encoding to ISO-8859-1 any longer (to my memory it used to change this). It does however, not look good since it is displayed as if the UTF-8 text is ISO.
The easiest way to get it to look OK everywhere is to use HTML entities instead. This does not seem to show up correctly in the simulation results browser in OMEdit, but does in Dymola:
Real TempC "<html>Temperature in °C<html>";