[rules-users] Re: rule text internationalization - write rules (drl) in chinese

Dejia Wang dejia.wang at gmail.com
Mon May 12 03:29:46 EDT 2008


> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20080512/6483981e/attachment.html 


More information about the rules-users mailing list