Opened 14 years ago

Last modified 14 years ago

#1493 closed defect (fixed)

OMEdit fails to use UTF-8

Reported by: Martin Sjölund Owned by: Martin Sjölund
Priority: high Milestone:
Component: Version:
Keywords: Cc: Martin Sjölund, Adeel Asghar

Description

Opening the following file results in garbage text being displayed:

(So does CodeBeamer, so see the attached file instead)
model 'è·³ã?­ã??ã??ã?¼ã?«'
  parameter Real e = 0.7 "å??ç?ºä¿?æ?°";
  parameter Real g = 9.81 "é??å??å? é??度";
  Real 'é«?ã??'(start = 1) "ã??ã?¼ã?«ã?®é«?ã??";
  Real 'é??度' "ã??ã?¼ã?«ã?®é??度";
  Boolean 'é£?è¡?'(start = true) "trueã?®å ´å??ã??ã??ã?¼ã?«ã??é£?ã??ã?§ã??ã??å ´å??ã??";
  Boolean '影�';
  Real 'æ?°ã??ã??é??度';
  discrete Integer 'ã??ã?¦ã?³ã?¹ã?®æ?°'(start = 0);

equation 
  'å½±é?¿' = 'é«?ã??' <= 0.0;
  der('é??度') = if 'é£?è¡?' then -g else 0;
  der('é«?ã??') = 'é??度';
  when {'é«?ã??' <= 0.0 and 'é??度' <= 0.0,'å½±é?¿'} then
      'æ?°ã??ã??é??度' = if edge('å½±é?¿') then -e * pre('é??度') else 0;
    'é£?è¡?' = 'æ?°ã??ã??é??度' > 0;
    reinit('é??度', 'æ?°ã??ã??é??度');
    'ã??ã?¦ã?³ã?¹ã?®æ?°' = pre('ã??ã?¦ã?³ã?¹ã?®æ?°') + 1;
  
  end when;
end 'è·³ã?­ã??ã??ã?¼ã?«';

If you copy-paste the first model into OMEdit, all non-ASCII characters turn into ????:

model '??????'
  parameter Real e = 0.7 "????";
  parameter Real g = 9.81 "?????";
  Real '??'(start = 1) "??????";
  Real '??' "??????";
  Boolean '??'(start = true) "true????????????????";
  Boolean '??';
  Real '?????';
  discrete Integer '??????'(start = 0);

equation 
  '??' = '??' <= 0.0;
  der('??') = if '??' then -g else 0;
  der('??') = '??';
  when {'??' <= 0.0 and '??' <= 0.0,'??'} then
      '?????' = if edge('??') then -e * pre('??') else 0;
    '??' = '?????' > 0;
    reinit('??', '?????');
    '??????' = pre('??????') + 1;
  
  end when;
end '??????';

Attachments (1)

JBouncingBall.mo (971 bytes ) - added by Martin Sjölund 14 years ago.
First file (UTF-8)

Download all attachments as: .zip

Change History (1)

by Martin Sjölund, 14 years ago

Attachment: JBouncingBall.mo added

First file (UTF-8)

Note: See TracTickets for help on using tickets.