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:
- copy and paste the above text into your favorite text editor
- save the file using UTF-8 (with or without BOM, or any other encoding) and close
- open again in favorite editor, then in OpenModelica and Dymola (in this order)
- if things still look good, hit the save button in Dymola (maybe delete a character and re-type it)
- open again in favorite editor, OpenModelica and Dymola
- at least some symbols will look different somewhere
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?