<br>&nbsp; Dejia,<br><br>&nbsp; This is probably a problem that requires fixing in the rules parser. Drools uses ANTLR to generate its parser.<br>&nbsp; Maybe you can help doing some research about any specific care that must be taken when working with ANTLR and unicode characters?<br>
<br>&nbsp; The grammar we currently use is here:<br><br><a href="http://anonsvn.labs.jboss.com/labs/jbossrules/branches/4.0.x/drools-compiler/src/main/resources/org/drools/lang/DRL.g">http://anonsvn.labs.jboss.com/labs/jbossrules/branches/4.0.x/drools-compiler/src/main/resources/org/drools/lang/DRL.g</a><br>
<br>&nbsp;&nbsp; Thanks, <br><br>&nbsp;&nbsp; []s<br>&nbsp;&nbsp; Edson<br><br><div class="gmail_quote">2008/5/12 Dejia Wang &lt;<a href="mailto:dejia.wang@gmail.com">dejia.wang@gmail.com</a>&gt;:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><font size="2">hi all, </font></div>
<div>&nbsp;</div>
<div><font size="2">we&nbsp;tried to write rules in chinese like follows</font></div>
<div>&nbsp;</div>
<blockquote dir="ltr" style="margin-right: 0px;">
<blockquote dir="ltr" style="margin-right: 0px;">
<div>rule &quot;Reorder alert when item expires&quot;<br>&nbsp;salience 10<br>&nbsp;when<br>&nbsp;&nbsp;&nbsp; 
$item : ImsItemRecords ()&nbsp;&nbsp;&nbsp; <br>&nbsp;then <br>&nbsp;&nbsp;&nbsp; if ( ! (new Date()).before 
($item.getExpireDate()))<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;SysAlert alert = new SysAlert(&quot;过期 - &quot; 
+ $item.getItemName(), &quot;补充库存&quot;, &quot;很高&quot;, &quot;新到&quot;, new Date(),&nbsp; null);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
SysRecommendation recommendation1 = new SysRecommendation (alert, &quot;补充库存&quot;, &quot;购买&quot; + 
$item.getAmount() + $item.getUnit() + $item.getItemName(), &quot;仓库管理人员&quot;, 
&quot;立即&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;...</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; HashSet recommendations = new HashSet();<br>&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;recommendations.add(recommendation1);</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ...<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;alert.setSysRecommendations(recommendations);&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;insert (alert);&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp; }<br>end</div></blockquote></blockquote>
<div><font size="2">The rule execution is&nbsp;fine, but the result is unexpected. some of 
above chinese characters (for example, <font size="3">&quot;新到&quot;</font>)&nbsp;are good; some of above 
chinese characters become ??? after rule evaluation. </font></div>
<div>&nbsp;</div>
<div><font size="2">any tips how to fix this.</font></div>
<div>&nbsp;</div>
<div><font size="2">thanks- dejia<br><br></font></div>
</blockquote></div><br>
<br>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br> Edson Tirelli<br> JBoss Drools Core Development<br> Office: +55 11 3529-6000<br> Mobile: +55 11 9287-5646<br> JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a>