0 Replies Latest reply on May 5, 2006 12:56 AM by louxinhua

    Help!About display Chinese

    louxinhua
      i want to display some Chinese in TextArea,but there are some troubles.
      For example:
      when i use the following type,it works right.
      ......
      var current_techer: Object=teach.teacher[0];
      ......
      <mx:Model id="teach" source="teachers/teachers.xml"></mx:Model>
      .......
      <mx:TextArea text="{current_teacher.name}"></mx:TextArea>
      .......
      But when i use the following type,it displays wrong.
      ......
      var current_teacher: Object;
      var teachers: Object;
      function initApp(){ // initialization
      teach.send();
      }
      function serverResult(event){
      teachers=teach.result.teachers;
      current_teacher=teachers.teacher[0];
      }
      .....
      <mx:HTTPService id="teach" url="teachers.xml" result="serverResult(event)"></mx:HTTPService>
      .......
      <mx::TextArea text="{current_teacher.name}"></mx:TextArea>
      .......
      The following is my XML file:
      <?xml version="1.0" encoding="gb2312"?>
      <teachers>
      <teacher>
      <name>Lee</name>
      </teacher>
      <teacher>
      <name>....Chinese....</name>
      </teacher>
      </teachers>