Skip to content

Instantly share code, notes, and snippets.

@thorade
Last active August 29, 2015 14:21
Show Gist options
  • Save thorade/1aa56a886b003fc1e42c to your computer and use it in GitHub Desktop.
Save thorade/1aa56a886b003fc1e42c to your computer and use it in GitHub Desktop.
code for investigating Dymola encoding problems
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;
@thorade
Copy link
Author

thorade commented May 21, 2015

To reproduce encoding problems:

  • copy and paste the above text into your favorite text editor
  • save the file using UTF8 (with or without BOM, or any other encoding) then 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 remove some character and type it again)
  • open again in favorite editor, OpenModelica and Dymola
  • at least some symbols will look different somewhere

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment