5 Replies Latest reply on Sep 4, 2006 1:11 PM by the real POTMO

    director, XML and russia


      i want to solve the following thing and it would be great if someone can help me:

      I have an XML-File encoded in UTF-8 which contains text in german, spanish and russian language.
      When i open the XML-File with my XML-Editor (Altova-Spy) or directly with the Internet Explorer all characters are shown correctly (even the russian ones).
      But when if load the Texts in a textmember using the XMLParser Xtra the russian texts appear as "???????".
      Spanish and German is shown correctly!

      So what's the problem? Isn't the XMLParser Xtra able to load Russian Characters?
      Cause when i copy/paste the russian Characters out of the word-file into a text member of Directir, they are shown correctly...

      Help! Any idea is appreciated!

      Thanx and greetings

        • 1. Re: director, XML and russia
          AFAIK director does not support unicode so its probably not the fault of the XTRA.
          • 2. Re: director, XML and russia
            the real POTMO Level 1
            ive been in that swamp just resently.
            The big problem is that Director (and shockwave) does only decode ANSI Latin 1 text. (Not UTF-8/UNICODE) but the xml-xtra does (but you have no use for it cos director cant handle it if its not in the standard Latin 1 codepage)

            What i did is that i saved the xml to be encoded with ISO-8859-5 (ANSI Cyrillic) outside director (like in xml-spy, i use it as well)
            Then I downloaded the xml to my shockwave i changed the text "ISO-8859-5" to "ISO-8859-1" (Western Languages AKA ANSI Latin 1) in the XML-tag.
            And then i parsed it with the XML-xtra. You'll now get strange text with ÅÄÖ and other (strange) latin 1 charcters.
            Before all that i made an ISO-8859-5 font and saved it as ISO-8859-1. So you got to have a font creator software and you'll have to experiment some depending on your software.
            So now i use my crazy text with ÅÄÖ and åäö and so on and use the ISO-8859-1 font mapped as ISO-8859-5 on the text-field.
            I know, this is a bit complicated but its just as har explaining as getting the hold of it if thats any confort for you.

            Anyway now you have "simulated" or "emulated" a cyrillic/russian text. Great!

            Dictionary for quick use.
            ISO-8859-1 Also known as Latin 1. Thats the font all western european languages use (as well as the US)
            ISO-8859-5 Cyrillic font. Thats what they use in russia.
            UTF-8 Containing all charcters from a large range of different languages. Can't be used in Director. This is one part of the UNICODE standard as well as the UTF-16 standard.

            This will also work on other languages such as greek and central euroean languages as long as its covered by the ISO-8859 standard.

            Read mor about ISO-8859 at wikipedia.org

            Please tell me if you get it right or just ask and ill try to help you more.

            /Nisse Bergman
            • 3. Re: director, XML and russia

              thanx for your detailed reply!
              OK, i have some further questions (what is related to my bad english ;-)
              You wrote that after you encoded your XML-File as ISO-8859-5 you "downloaded" the file
              to your shockwave. What do you mean with "downloaded" and how do to change the ISO-8859-5 in ISO 8859-1.
              With the Editor / Word Pad? Why can't you encode the XML File already with the XML Spy into ISO 8859-1?
              Does the ISO 8859-1-encoding also work with german, spanish, italian, a.s.o?
              What software di you use to create the font? Is there some freeware available?
              Would you make me your font available so that i can experiment a little bit with it, before creating a font that fits in my project.
              OK last question: Is there a way to encode the russian characters into ASCII-Code, then put the ASCII-Code into the XML-File, parse it with director and re-encode the ASCII-Code into readable and correct russian fonts?

              OK , it would be great, if you could give me some more help.
              You are my only hope ;-(
              • 4. Re: director, XML and russia
                the real POTMO Level 1
                ive got the fonts at work and the software too for font publishing (but its not free but i can give you the name i cant remeber it now). Ill send you the fonts as well if you send me a private mess with your email.

                Nad by the way. If you change the ISO-8859-5 to ISO-8859-1 in xmlspy it will complain that there are characters that isnt in ISO-8859-1 and then it will replace all character with "????".

                Ill come back with more info on monday about downloading. And dont go to ASCII by the way. It will do you no good.

                • 5. Re: director, XML and russia
                  the real POTMO Level 1
                  the software i used is called Studio 5.
                  to download just use getNetText(tUrlToXML)

                  to search and replace:

                  on SearchAndReplace theText, stringToFind, stringToInsert
                  hasChar = offset(stringToFind, theText)
                  repeat while hasChar
                  put stringToInsert into theText.char[hasChar..hasChar+length(stringToFind)-1]
                  hasChar = offset (stringToFind, theText)
                  end repeat
                  return theText