How to display Japanese text from an XML file

Hiya,
I have various adapted mp3 players [called playlists on my site] which retrieve the songs and song titles/artists from an XML file. One of them plays Japanese music.
Most of the tracks are in English but I now have a couple of songs with Japanese titles and file names which I can't get to preview/display in Flash Pro CS5 [Mac]. I can type static Japanese text and it displays fine but Flash seems to be having a problem with the Japanese from the XML file.
Though I can find the English titles, etc, it would be nice if there were a way to display Japanese text from a 'multi-lingual' [English and Japanese] XML file [probably something really easy].
Thanks a bunch.
steve

This should help you:
http://http://www.packtpub.com/article/working-with-xml-in-flex3-and-java-1http://www.packtpub.com/article/working-with-xml-in-flex3-and-java-1

Similar Messages

  • Importing Arabic text from an XML file

    Importing text from an XML file to appear as text in Flash
    works in English, however if the text I want to import is in
    Arabic, when I test the movie there is no text at all.
    Is there some particular syntax to preface the Arabic text?
    I'll want to import text from XML in other languages too.
    (French)
    I'd cut and pasted some Arabic text into the XML file that
    displays pictures and text in the "slideshow.fla" (
    http://www.adobe.com/support/flash/applications/jpeg_slideshow_xml/jpeg_slideshow_xml03.ht ml)
    Substituting Arabic text for English text, editing the XML
    file with Dreamweaver.
    Any ideas as to how I might achieve my objective of importing
    Arabic text into Fash?
    I'd started developing my prototpe in Macromedia Director 7,
    and then Director MX, but I have not found a suitable Arabic font
    that I can embed that will allow me to display Arabic fonts in
    Adobe Director. I have the Arabic text in a Word document.
    I've dicovered that my Flash MX Pro and Dreamweaver both
    support Arabic fonts, but I want to import text from an XML file.
    I'd prefer using cast libraries and cast members, but I don't
    know of an equivalent in Flash to what I'm comfortable with in
    Director.

    Oh so many questions. You probably aren't going to like the
    answers. I have Flash MX04 pro (aka Flash 7) and things made a big
    jump between MX (aka 6) and MX04. If you only have MX, there might
    not be a way to do this. All my advice is based upon MX04 or
    higher.
    It is possible to do complex languages in Flash. My
    experience is with Hindi and I've helped a few folks here with
    Arabic.
    You won't be able to use text from Microsoft Word – at
    least I don't think so. The XML file will need to be saved in the
    UTF-8 format. I think Word uses its own scheme and won't work. But
    I'm not a Word expert. Something like Text Edit (Mac) or WordPad
    (PC) should be able to save a UTF-8 file.
    The next problem is you mention "suitable Arabic font that I
    can embed." AFAIK, you can't embed any of the complex scripts in
    Flash. You just have to rely on the end user having appropriate
    fonts installed and enabled. Most operating systems from 2000 on do
    have this – although some folks like to remove them to save
    space.
    Next issue will be line composing. I've found that when using
    anything above the normal Latin range that Flash suddenly forgets
    how to make a line fit into a text area. It will just break things
    in the middle of words and not even notice the spaces between
    words. I've written a little snippet of code that "composes" the
    lines. It works well with Hindi and folks here have used it with
    Arabic and not come back saying that it doesn't work. Search the
    forums (both the Flash and Actionscript) if you can't find it I'll
    dig it out when I get home.
    So here is the checklist:
    Make sure the XML is saved in UTF-8
    Import the XML file
    In Testing environment go Debug–>List variables.
    Does it show up correctly there?
    Does it show at all in a text field?
    Use the "composer" to make the lines break.

  • How to read configuration data from an xml file (not web.xml)?

    Hi,
    I want to separate the application specific configuration parameters in a separate xml file and read them as and when they are needed? I know that I can use the wb.xml but I want to separate them in a different xml file because I don't want the web.xml file to be played around later after deployment. If any change is needed then it should be done in the application-config.xml.
    How can I read the parameters from this xml file in my jsp code and also what should be the location of this file if I have
    ../webapps/Root/application
    directoty structure ?
    Any help is greatly appreciated.

    can you give an example of a property file and also
    it is loaded in the jsp ?Hmm... loading properties in a JSP is not a very good idea. You should do it in a separate class, rather than mixing the logic with the display logic.
    Properties properties = new Properties();
    properties.load(UtilClass.class.getResourceAsStream("config.properties"));
    // Add a try - catch block around the load
    // for IOException...

  • How to populate a form from an xml file with multiple records

    I want to be able to create a single form that will add pages as needed based upon the number of records being imported from an xml file.
    I have an IRS form that does this exactly, but I do not know how to re-create it.  I entered data into the form, then exported that data to xml.  Then I opened that xml file in excel and added more records (this is just an easy way to manage the xml data in a tabular form).  Then I import the changed xml file into the IRS form and it adds as many pages as I have records.  Perfect!  Unfortunately, I cannot edit the form to examine the technique.  It does not appear to be relying upon any additional local javascript files.  It does use an 'add page' button which may suggest the form is using the template .spawn() technique, but when I try that in my own form, it gives me unique field names for each page which are then not consistent with the xml data.  Hopefully someone can help me understand what I am missing.

    did you want
    <record>0
    <data>"11.97.23.174/32"
    <record>address <data>
    <record>address <data>
    <record>subnet <data>
    <record>ip <data>"10.97.23.174"</data></record>
    </data></record>
    </data></record>
    </data></record>
    </data></record>
    or
    <record>0
    <data>"11.97.23.174/32"
    <record>address <data>
    <record>address <data>
    <record>subnet <data>
    <record>ip <data>"10.97.23.174"</data></record>

  • How to generate GUI code from parsed XML file?

    hai,
    I have to generate GUI code after parsing any configuration XML file as input.Now i have parsed my XML file and got its attributed and i want to get some idea of how to map the parsed XML attributes to the java code to build GUI code.

    Hello,
    1. I like to create data type from a XML file structure, which contains the data structure ?
    XML fields will need to be taken note of to see which is repeating or not. You can also load the XML into a third-party tool such as Altova XML Spy and then generate an XSD from there. You will need to import the XSDs into PI under external definitions. However, this does not guarantee business interoperability, as such, it is always best to ask the provider for the XSDs or WSDL. It will also save you a lot of time from guessing which fields are needed or not.
    2. How to create custom node function in graphical mapping editor ?
    In your graphical mapping editor, on the lowest left corner, there is an icon there that says Create New Function. You must take into account their return types:
    1. Single Values = String
    2. Queue/Context (no return type) thus resultList is used.
    Hope this helps,
    Mark

  • How can i extract text from Power point files,wod files,pdf files

    hi friends,
    i need to extract text from the power point files,word files,pdf files for my application.Is it possible to extract the text from the those files .If yes plz give solution to this problem.i would be thankful if u givve solution to this problem.

    My reply would be the same.
    http://forum.java.sun.com/thread.jspa?threadID=676559&tstart=0

  • How to quick import Tags from a xml file?

    Good morning/afternoon/night everyone.
       I have this client that want me to import something like 1000 tags from a xml file in CQ5.5. I know I can do it programatically and in dev.day.com I have already found some instructions, but, there is some easier way to do this? Or, if the only way is developing a bundle to run in a workflow (and then the client can import tags from xml files anytime he want to), do you guys have some advice or guidelines?
    Thanks!

    I would expect it should be possible using vault. If you export an existing namespace from cq using vault (checkout/update) you can see what format it should be in. Then you should convert your xml to match that format (perhaps using XSLT) and use vault in the other direction (commit).
    We are using vault all the time behind the scenes using a vault plugin for maven. This way we can export content from one developer's cq instance, put it in SVN and have another developer import it in his cq instance, all using maven (and vault). This is especially usefull for general content structures and for tags.

  • How to get the number from a xml file to flash as3 Text Box "Get_Days"?

    Hi,
    I have to daily update the number of days finished from the specified days. Say, One work to be finished in 30 days. And the start day is today. So, tomorrow it will be 29 days left. and so on....
    So, instead of reducing one number everyday from the last days number using flash, it will be easy changing in xml file.
    How can I do that?
    I have a simple text box "dynamic text box" and the instance name : "Days_Left". Since I am learner, I cannot make complex projects. I am learning small things with very few lines of code which can be modified using xml files.
    So, Whatever I type in a xml file, it should appear in a text box called "Days_Left".
    Thanks.

    then you can use:
    var currentDate:Date = new Date(); 
    // this is today's date
    var projectDueDate:Date = new Date(2010,11,29); 
    // use whatever date you want for the due date.
    // months are zero-based.  (ie, jan is month 0, dec is month 11.)
    var daysToCompleteProject:Number = (projectDueDate.getTime()-currentDate.getTime())/(1000*60*60*24);
    // this is number of days between currentDate and projectDueDate.  you probably want to round or use days:hours:minutes for your display

  • How to display Japanese fonts in a .txt file i received?

    I received an email attachment that is a .txt file.
    Some of it is in Japanese and some is in English.
    The Japanese text turns out to look like gibberish.... like this...
    Media Start Media End Duration Log Note
    01:17:12;18 01:17:20;26 00:00:08;09 DZÇÍÇÁÇÃÉCÉìÉåÉbÉgÇÇøÇÂÇ¡Ç∆âÒǡǃÇ≥ÅAÇ¢ÇÎÇÒÇ»É]Å[ÉìÇ÷ǢǡǃǛǃÇsÇÖÇíÇíÇÅÇâÇéÇ ÷LJǡÇ∆ãflÇ≠çsǡǃÇ≥ÅAÉwÉäÇÃñ≥ë éûä‘Çè≠Ç»Ç≠Ç∑ÇÈÅB
    01:17:25;21 01:17:30;21 00:00:05;01 â¥ÇÁÇ©ÇÁ3ÉÅÅ[É^Å[ÇÃÇ∆DZÇÎÇ≈äCÇ™ÉAÉâÉCÉîDžǻǡÇΩÇÊÅI
    01:17:32;10 01:17:36;20 00:00:04;11 ÉwÉäǙdžÇÈÅBëDǙdžÇÈÅBå„âΩÇ™ó~ǵǢÅH
    If i send this cut/paste back to the person who emailed it to me, they say it is displaying fine in Japanese.
    I have no idea how to make this text show up in Japanese.
    Thanks for any help.
    Brian

    You might try giving the file a ".txt" extension. Then drag it on top of your Safari icon in the dock, which should open it with Safari. Then, under "View", select a Japanese "Text Encoding". My guess is that this is Shift-JIS.
    I am assuming you have not removed Japanese fonts from your system.

  • ASP / PHP pages: How to get streaming info from a XML file?

    Hi all
    I am using Adobe Flash Media Streaming Server 3.5 but I can't find any output file (fx a xml file) that I can pull out info from and use on my website via a PHP or ASP script. It could be nice - in the website - to retrieve info like "online users attending", "running / streaming state" (online or offline) and other relevant info about the streaming, so I on the website can display how many that are online when a webtv event is streaming.
    I see the the info when I login at the web admin for FMS, but I need a solution that can work with ASP or PHP.
    I simply can't find any file / address to get this kind or output out of FMS - can you help?
    Thank you
    Kind regards,
    Jens

    hi,
    can you share php code for grabbing data. i make php code using "simplexml_load_file" but the problem is it takes 2-3 minutes before it show the result. i want to monitor the current video if stop feeding.
    http://server1:1111/admin/getLiveStreams?auser=admin&apswd=admin&appInst=appname
    xml
    This XML file does not appear to have any style information associated with it. The document tree is shown below.
    <result> 
    <level>status</level> 
    <code>NetConnection.Call.Success</code>
    <timestamp>3/21/2015 7:47:17 AM</timestamp>
    <name>_defaultRoot_:_defaultVHost_:::_0</name>
    <data> 
    <_0>appname</_0> 
    </data>
    </result>
    here;s my php code:amsstats.php
    <?php
        $result = simplexml_load_file("http://server1:1111/admin/getLiveStreams?auser=admin&apswd=admin&appInst=appname");
        echo $result->data[0]->_0;
    ?>
    result:
    http://server2/stats/amsstats.php

  • How to import the data from a xml file to IDM

    Hi all:
       I have read  the document(/people/kare.indroy/blog/2008/01/14/sap-netweaver-identity-management-how-to-maintain-xml-files) ,but
    cannot get the data when I click the insert template-->data source template menu.
    The xml file as follows:
    <?xml version="1.0" encoding="GB2312"?>
    <users>
    <user>
    <name>CA_admin</name>
    <password>123</password>
    <role>caadmin</role>
    </user>
    <user>
    <name>CA_user1</name>
    <password>123</password>
    <role>caadmin</role>
    </user>
    </users>
    The xsl file as follows:
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="users"> 
    <xsl:element name="users">      
                    <xsl:for-each select="user"> 
                     <xsl:element name="user">
                      <xsl:element name="name">               
                          <xsl:value-of select="name"/>
                      </xsl:element>
                      <xsl:element name="password">               
                           <xsl:value-of select="password"/>
                      </xsl:element>
                      <xsl:element name="role">               
                          <xsl:value-of select="role"/>
                      </xsl:element>
                      </xsl:element> 
                    </xsl:for-each>
                     </xsl:element>            
    </xsl:template>
    </xsl:stylesheet>
    Is there some thing wrong within my xsl file? Who can give me some points about this?
    Is there some more information about this topic?
    thanks in advanced.

    Hello Shi,
    Could you please provide details about how did you solve this problem?
    Thanks,
    Anuj

  • How to load a variable from an XML file?

    I need to use an XML file so I can update one variable every
    once in a while.
    Let's say I want to load Variable "foofie" into a flash
    movie, and the XML says that "foofie" is 11.
    What code do I put in my flash file to read what 'var foofie'
    is from an XML, and what do I put in the XML so I can frequently
    update what number is stored in 'foofie'
    Thanks!

    look up XML.load(url) in flash help, it's fairly simple
    in the xml you put, for example
    <foofie>11</foofie>
    if foofie is in a database or some other dynamic place,
    (which I assume, since you want to frequently update to its value)
    you need to write a script, in php for example, that returns the
    desired xml data

  • How to format the text in an XML file

    This should be a fairly easy one. A fairly easy one that seems to be hard to actually find.
    When I write out the XML file, it's all on a single line. Not a huge problem all things considered (it works), but an annoying one.
    Here's the a snippet, to show what I'm doing. There's not enough information for this to actually compile, if one is so inclined, just comment out a bunch of things and have it write out aribitary data.
    Is this a case where I just need to manually write the formating myself?
    public void saveXML(File file){
            try{
                Document doc = DocumentBuilderFactory.newInstance().
                    newDocumentBuilder().newDocument();
                //give that document a root
                Element root = doc.createElement("root");
                doc.appendChild(root);
                Command[] command=getCommands();
                for (int index=0; index < command.length; index++){
                    Element element = doc.createElement("Command");
                    root.appendChild(element);
                    //get the name of the parser class this command should use
                    String pName=command[index].getParser().getClass().getName();
                    //remove everything but the last word
                    pName=pName.substring(JavaMUServer.PARSER_PATH.length());
                    //set the information.
                    element.setAttribute("name",
                        command[index].getName());               
                    element.setAttribute("parser",pName);               
                    element.setAttribute("method",
                        command[index].getMethod().getName());
                TransformerFactory tFactory =TransformerFactory.newInstance();
                Transformer transformer = tFactory.newTransformer();
                DOMSource source = new DOMSource(doc);
                StreamResult result = new StreamResult(
                    new FileWriter(file));
                transformer.transform(source, result);
            }catch (Exception e){
                e.printStackTrace();
        }

    Well, that helped quite a bit. Seems however when I set the indent property, rather then indenting it just makes new lines. Rather counter intuitive.
    Here's the slightly modified code (changed one line really. Tried setting a few different properties.)
    public void saveXML(File file){
            try{
                Document doc = DocumentBuilderFactory.newInstance().
                    newDocumentBuilder().newDocument();
                //give that document a root
                Element root = doc.createElement("root");
                doc.appendChild(root);
                Command[] command=getCommands();
                for (int index=0; index < command.length; index++){
                    Element element = doc.createElement("Command");
                    root.appendChild(element);
                    element.appendChild(doc.createElement("sample"));
                    //get the name of the parser class this command should use
                    String pName=command[index].getParser().getClass().getName();
                    //remove everything but the last word
                    pName=pName.substring(JavaMUServer.PARSER_PATH.length());
                    //set the information.
                    element.setAttribute("name",
                        command[index].getName());               
                    element.setAttribute("parser",pName);               
                    element.setAttribute("method",
                        command[index].getMethod().getName());
                TransformerFactory tFactory =TransformerFactory.newInstance();
                Transformer transformer = tFactory.newTransformer();
                transformer.setOutputProperty("indent", "yes");
                //transformer.setOutputProperty("method", "xml");
                DOMSource source = new DOMSource(doc);
                StreamResult result = new StreamResult(
                    new FileWriter(file));
                transformer.transform(source, result);
            }catch (Exception e){
                e.printStackTrace();

  • How to create Bar chart  from existing XML file

    Hi all,
    i'm new to flex, i need your help to develop a flex for
    dashboard app. we have sample.xml file. by using this i need to
    create a bar diagram or piechart.
    Please help me out
    The XMl looks like this.....
    <?xml version="1.0" encoding="utf-8"?>
    <user id="123412343">
    <fullName>
    <lastName>Telles</lastName>
    <firstName>vijay</firstName>
    </fullName>
    <preferences>
    <modWidth>235</modWidth>
    <modHeight>250</modHeight>
    <totalWidth>1650</totalWidth>
    <totalHeight>1650</totalHeight>
    <modsX>4</modsX>
    <modsY>2</modsY>
    </preferences>
    <module id="Status2">
    <windowOpen>true</windowOpen>
    <pointsToShow>
    <p label="Proposed"/>
    <p label="Draft"/>
    <p label="DEP Adpt"/>
    <p label="EPA Adpt"/>
    </pointsToShow>
    <dataSetsToShow>
    <label>2006</label>
    <label>2007</label>
    </dataSetsToShow>
    </module>
    </user>

    convert this xml to ArrayCollection called chartData
    var charOption:String = "totalHeight"; /Use this to set the
    yField property...
    <mx:ColumnChart showDataTips="true" id="barChart"
    width="100%" height="100%" dataProvider="{chartData}"
    color="0xffffff">
    <mx:horizontalAxis>
    <mx:CategoryAxis
    dataProvider="{chartData}"
    categoryField="hour" />
    </mx:horizontalAxis>
    <mx:verticalAxis>
    <mx:LinearAxis labelFunction="addDollarSign"/>
    </mx:verticalAxis>
    <mx:series>
    <mx:ColumnSeries yField="{chartOption}"
    showDataEffect="interpolate"
    creationCompleteEffect="interpolate"/>
    </mx:series>
    </mx:ColumnChart>

  • How to display Japanese Text in web page?

    Hi,
    I am trying to get this i18n stuff right for a few days but don't seem to find all answers.
    I am using Sybase databse to store Japanese characters. A perl script inserts the chars in table. Then I use a test JSP program to display the chars.
    <%@ page contentType="text/html; charset=UTF-8" %>
    <%@ page language="java" %>
    <%@ page import="java.io.*" %>
    <%@ page import="java.sql.*" %>
    <%@ page import="java.util.*" %>
    <%@ page import="javax.sql.*" %>
    <%@ page import="javax.servlet.*" %>
    <%@ page import="javax.servlet.http.*" %>
    <%@ page import="javax.naming.InitialContext" %>
    <%@ page import="java.text.SimpleDateFormat" %>
    <html>
    <head><title>testing for utf string</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    </head>
    <body>
    <%
    Connection conn = null;
    Statement stmt = null;
    ResultSet rs = null;
    try{
            InitialContext context = new InitialContext();
            DataSource ds = (DataSource) context.lookup(System.getProperty("TESTDS"));
            conn = ds.getConnection();
            stmt = conn.createStatement();
            rs = stmt.executeQuery("select comment from TestTable");
            while(rs.next()){
                    out.println("<br>");
                    out.println("the comment is : <Textarea Cols=\"90\" Rows=\"5\" Name=\"Comment\">"+rs.getString(1)+"</Textarea>");
                    out.println("<br>");
                    out.println("the comment is "+rs.getString(1));
    }catch(Exception e){
            e.printStackTrace();
    }finally{
            try{
            if(rs != null) {rs.close();}
            if(stmt != null) {stmt.close();}
            if(conn != null) {conn.close();}
            }catch(Exception e){}
    %>
    </body>
    </html>But the page does not display correctly. If I change the charset as JIS, then it seems to work. But my web page will be having chars from multiple language and I think utf-8 is the right charset for that.
    Any pointers?
    Thanks

    What JSP/Servlet server are you using and what version?
    Try this just for debugging:
    Remove the rs.getString(1) from the out.println() call. Just assign the returned value to a local String variable and display the variable using (I hope I'm remembering correctly) this:
    <%= myVariable %>
    I'm curious whether directly inserting the text into the page is somehow different from sending it via out.println.
    Regards,
    John O'Conner

Maybe you are looking for

  • Ipod classic won't sync with itunes 10.6.3

    My new iPod Classic 7th Gen (2.0.5 mac) is not syncing with iTunes 10.6.3. I get an error message telling me to update iTunes to a version above 10.7. This is not possible on a Powermac G5 (10.5.8) since it has no Intel Core. Is there any way to rest

  • Problems with autofill when editing address book entries

    When i try to change eg miller to Miller, anna to Anna etc 1) the initial letter remains lower case and 2) even worse, another iller/nna is added on to the end - milleriller, annanna etc. I've tried deleting the whole name and starting again - no joy

  • Data Type change.

    Hi Expert. Please help me,   I have create Z table here create one Field like Below. APPROVED_STATUS CHAR 1 0 Source then i was change pre-define data type length CHAR 1 to 10. as below APPROVED_STATUS CHAR 10 0 Source Now When We save data through p

  • LOGITECH REVUE FLASH PLAYER

    MY LOGITECH REVUE SHOWING FLASH PLAYER 10.2 BUT IN ORDER TO PLAY CERTAIN VIDEOS  NEED VERSION 11 OR NEWER BUT THERE IS NO OPTION TO INSTALL ANY VERSION IN MY REVUE BECAUSE IT SAYS IT HAS BEEN ALREADY INSTALLED IN THE CHROME AND UPDATED AUTOMATICALLY

  • Blu-Ray Image

    Hello, I just created a blu-ray image using Encore and I was wondering if there's a way to mount the image without having to burn the content.  I do not have a blu-ray burner, so I was looking if there was a way around it.  I am not sure if Virtual C