2 Replies Latest reply on Aug 23, 2010 11:44 PM by opspl

    problem with phonetic alphabet

    opspl Level 1

      I have some phonetic alphabets in an xml file. I have the xml encoding as utf-8 and also saved the xml as utf-8.

      In the xml there's this upsilon ʊ character and for this I have used the ascii value which is ʊ. Here's my xml sample:

      <?xml version="1.0" encoding="UTF-8"?>

       

      <test q="0">
          <question><![CDATA[<b>Mark makes <I>k/t</I> and <I>g/d</I> substitutions, saying things like ko&#650; / to&#650;</b>]]></question>

      </test>

       

       

      When I get these characters in flash, it doesn't display them and in place of these characters it displays a square.

      My textbox is set as htmlText. Everything else works fine, I'm stuck only for this problem.

      Please help.

       

      Thanks,

      opspl

        • 1. Re: problem with phonetic alphabet
          Rothrock Level 5

          I'm thinking that the font you are using doesn't contain the upsilon character. I used the following code:

           

          var myXML:XML=new XML("<test q='0'> <question><![CDATA[<b>Mark makes <I>k/t</I> and <I>g/d</I> substitutions, saying things like ko&#650; / toʊ</b>]]></question></test>")

          var theField:TextField;

          theField.html=true;

          theField.htmlText=myXML.firstChild.childNodes[1].childNodes[0].nodeValue

           

          and I'm able to display the character just fine. I'm wondering why you are using the html codes for the character, so I tried one with that and one with just the regular character.

           

          I embedded the font (only basic latin) and the character disappeared. But then I added the character to the "include these characters" box and it came back.

           

          So you might want to use just this test to see if it works. If it works then perhaps there is a problem with your xml file.

           

          I've been around these forums along time and there are many times when folks have sworn up and down that their file is saved as UTF-8, but after many go-arounds we finally figure out that it isn't for one reason or another. So just be absolutely certain that it is. Although since you are using the html encoding which only requires regular ascii characters it shouldn't be a problem.

          • 2. Re: problem with phonetic alphabet
            opspl Level 1

            Thanks a million.

            You were absolutely right...the font I was using didn't contain the upsilon charater.

            I'm using Verdana and now I changed to MS Mincho only for those characters. It displays perfectly.