Discussion:
director, XML and russia
(too old to reply)
basementmedia
2006-08-29 14:00:40 UTC
Permalink
Hi,

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

Daniel
jonnno
2006-08-29 15:41:39 UTC
Permalink
AFAIK director does not support unicode so its probably not the fault of the XTRA.
the real POTMO
2006-08-29 21:49:29 UTC
Permalink
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
wrongside
2006-08-30 05:45:45 UTC
Permalink
Hi,

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 ;-(
the real POTMO
2006-08-31 21:53:33 UTC
Permalink
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.
the real POTMO
2006-09-04 20:11:59 UTC
Permalink
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
end

Loading...