Opened 13 years ago
Last modified 13 years ago
#1683 closed defect (fixed)
Accented letters in the comments end up in the Model_init.xml and make it not well formed.
Reported by: | Adrian Pop | Owned by: | Adrian Pop |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Version: | ||
Keywords: | Cc: | Adrian Pop, Adeel Asghar, Adrian Pop, Martin Sjölund |
Description
Thanks a lot to Francesco for finding this bug.
model Test Real x "densità fluido"; equation der(x) = -1 * x; end Test;
Attachments (1)
Change History (13)
comment:1 by , 13 years ago
comment:2 by , 13 years ago
WORKSFORME
{{{loadString(iconv(readFile("a.mo"),from="ISO-8859-1"));
simulate(Test);getErrorString();}}}
Or simply loadFile if it is already UTF-8
comment:4 by , 13 years ago
Wow, OMNotebook is stupid.
The .onb is stored as UTF-8. My locale setting is UTF-8. Yet it converts the text to ISO-8859-1 for the input cell? *cries*
comment:5 by , 13 years ago
OMNotebook will handle the following properly:
{{{model Test
Real x "densità fluido ??????";
equation
der(x) = -1 * x;
end Test;}}}
EDIT: (CodeBeamer doesn't like Japanese characters and makes them ?????)
Stored in the .onb and displayed by the GUI. Works fine. But sending it over CORBA converts it to ISO-8859-1...
{{{model Test
Real x "densit<E0> fluido ??????";
equation
der(x) = -1 * x;
end Test;}}}
comment:6 by , 13 years ago
Maybe there is a setting in omniorb/mico or we might need to recompile it with some other flags?
comment:7 by , 13 years ago
http://omniorb.sourceforge.net/omni41/omniORB/omniORB004.html
nativeCharCodeSet default = ISO-8859-1 The native code set the application is using for char and string. See chapter 9.
comment:9 by , 13 years ago
Good question. I think you should set it for the client and see what happens.
If is not working I can look more at the mico corba settings in OMC.
comment:10 by , 13 years ago
No, it's much simpler. Simply pass the damn unicode string to OMC. Server and client uses 8859-1 encoding so it will be passed verbatim. I know I fixed the same thing for OMEdit before (it was also silly, converting .toLatin1() before sending the expression). The example is now working.
comment:12 by , 13 years ago
I attached the notebook I tested. It does work properly. Also, toLocal8Bit is the same as UTF8 for me ;)
This model was in OMNotebook, maybe that's the problem.