List Info

Thread: Re: rule text internationalization - write rules (drl) in chinese




Re: rule text internationalization - write rules (drl) in chinese
user name
2008-05-12 02:29:46

hi all,
 
we tried to write rules in chinese like follows
 
rule "Reorder alert when item expires"
 salience 10
 when
    $item : ImsItemRecords ()   
 then
    if ( ! (new Date()).before ($item.getExpireDate()))
   ; {
      SysAlert alert = new SysAlert("¹ýÆÚ - " + $item.getItemName(), "²¹³ä¿â´æ", "ºÜ¸ß", "е½", new Date(),  null);
      SysRecommendation recommendation1 = new SysRecommendation (alert, "²¹³ä¿â´æ", "¹ºÂò" + $item.getAmount() + $item.getUnit() + $item.getItemName(), "²Ö¿â¹ÜÀíÈËÔ±", "Á¢¼´");
    ;  ...
      HashSet recommendations = new HashSet();
      recommendations.add(recommendation1);
    ;  ...
   ;   alert.setSysRecommendations(recommendations);   
      insert (alert);  
  ;  }
end
The rule execution is fine, but the result is unexpected. some of above chinese characters (for example, "е½") are good; some of above chinese characters become ??? after rule evaluation.
 
any tips how to fix this.
 
thanks- dejia


[1]

about | contact  Other archives ( Real Estate discussion Medical topics )