Solution:

Use bellow function to convert Japanese text(Double byte text) to English
text (Single byte text) and pass returned text to filterfunction.

Its so simple.... :)


   1. public static function changeToBj(s:String):String
   2.         {
   3.             if (s == null)
   4.                 return null;
   5.             var temps:String="";
   6.             for(var i:Number=0; i < s.length; i++)
   7.             {
   8.                 if (escape(s.substring(i, i + 1)).length > 3)
   9.                 {
   10.                     var temp:String=s.substring(i, i + 1);
   11.                     if (temp.charCodeAt(0) > 60000)
   12.                     {
   13.                         var code:Number=temp.charCodeAt(0) - 65248;
   14.                         var newt:String=String.fromCharCode(code);
   15.                         temps+=newt;
   16.                     }
   17.                     else
   18.                     {
   19.                         if (temp.charCodeAt(0) == 12288)
   20.                             temps+=" ";
   21.                         else
   22.                             temps+=s.substring(i, i + 1);
   23.                     }
   24.                 }
   25.                 else
   26.                 {
   27.                     temps+=s.substring(i, i + 1);
   28.                 }
   29.             }
   30.             return temps;
   31.         }
   32.


   1.



On Tue, Aug 9, 2011 at 12:27 PM, Myadi H <myad...@gmail.com> wrote:

> **
>
>
> Hello guys,
>
> I need your quick and very important suggestion.
>
> How to filter multilingual text? For example-
> In japanese, hiragana and katagana fonts will take 2 bytes to specify each
> charecter. when you type text in japanese language say 'A' it writes as 'A '
> i.e., a space after text.
>
> What if i type 'A' In japanese and grid contains ENGLISH text. How to
> filter?
>
> Please help me out ASAP....
>
> Thank you
>
>
>  
>

Reply via email to