for(var i:int=0;i<;i++){ var char:String = (i,1); if(/[^\x00-\xff]/(char)){ // Add 10 in ChinesescreenLength = screenLength + 10; }else{ screenLength = screenLength + 1; } }