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

non-ASCII-characters

non-ASCII-characters

Hi there,

I started looking at OM today as an alternative to Dymola, for a mechanical engineering class in which I teach Modelica (as a TA).

Is it correct that OM cannot handle non-ASCII characters (ü, ä, ö, ß and so on) in path names, file names, variable annotations or any place?? When I load and check a model, everything is fine, but when I press the little green button to start a simulation I get an error message that reads:

"Process crashed throw    | [line] 255 | [file] simulation/simulation_input_xml.cpp | simulation_input_xml.cpp: Error: failed to read the XML file Exercise4.MainModel_init.xml: not well-formed (invalid token) at line 171"

where line 171 of the respective file is description = "Ůderung der Federl寧e m"

That line contained a German text that said "Änderung der Federlänge m" and is displayed correctly in the OMEdit model editor window. Somewhere though the program that wrote the XML file screwed up the non-ASCII characters Ä and ä.

It seems to me that this should be rather easy to fix, no?

It may be a trivial issue on one hand from a programming point of view ("just don't use those characters"), but on the other hand, it's extremely annoying from a user point of view when you already ~100 exercises that all have such characters somewhere. I thought the days where you should stick to ASCII characters and limit file names to 8 characters were long gone. current/sad

Edited by: dael - Feb-09-12 17:40:07

Re: non-ASCII-characters

Or is that a problem with the compiler? If so, how can I swap the compiler for something else?

Re: non-ASCII-characters

OpenModelica does handle UTF8 characters in filenames, classnames, comments, annotations. At least in Linux, where UTF8 is the default. For Windows, some of the defaults seem to assume Wndows-1252 encoding and OMEdit has not been updated to handle this.

Noone reopened http://openmodelica.org:8080/cb/issue/1 … ation=true so I'm assuming the next nightly build will be working on Windows...

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