Page 1 of 1
Need help with unicode and xml
Posted: Sat Jun 24, 2006 8:19 pm
by tsalagi
I have been developing a Cherokee-English dictionary for several years, and about a year ago, I decided I needed to store my data in xml format, so it can be converted to a dictionary server-useable format.
The problem is, I have one field in Cherokee syllabary (entered directly into my Revolution field), which needs to be saved in the xml file. I have read everything I can find about Rev and unicode, but I can't get anything to work correctly! I get garbage in my xml file every time.
I just renewed my Rev license after a long lapse, hoping that some progress has been made. I hope I didn't waste my money.
If anyone can help me, I would be grateful!
(Mac osx - Rev 2.7.2)[/i]
Posted: Sat Jun 24, 2006 11:11 pm
by Obleo
I also had similar issues until I picked up STS XML Library from Sons of Thunder. It is a reasonable priced and works so good.
If posting a link to it's web page is not good some let me know and I will edit the post, and remove it.
http://www.sonsothunder.com/products/xmllib/xmllib.htm
They have much info on the difference of this library and revolutions built in XML lib. I think revolution build in lib is great it does not do every thing that STS XML Lib does.
If someone else has a direct solution with run revs lib to fix your problem I still recommend checking out this helpful solution.
Thanks, this will help me with XML, but....
Posted: Sun Jun 25, 2006 6:36 pm
by tsalagi
This will help with my xml. The unicode, though, is still my biggest problem.
Why oh why did the developers decide to go with utf16, when the rest of the world uses utf8? I just don't get it!
Posted: Fri Jun 30, 2006 10:13 am
by Mark
Dear Tsalagi,
Economy-x-Talk has a lot of experience with unicode and can help you. Maybe, we should find a non-xml solution. Please, write me off-list with a detailed description of the problems at
support@economy-x-talk.com
Best regards,
Mark
Posted: Fri Aug 04, 2006 1:06 am
by rol4leg
**Dear Tsalagi,
**I use this code to generate my XML file in unicode
**GeneratedLfile is your ".xml" file
**field "PreXML" would be your "field in Cherokee syllabary" which should be written in XML of course
on mouseUp
---------------UTF8-------------------------
set useUnicode to true
put "C:\Documents and Settings\All Users\Documents\Revolution 1.1.1\" & GeneratedLfile into tPath
open file tPath for binary write
write uniDecode (bom() & the unicodeText of field "PreXML", "UTF8") to file tPath
close file tPath
--------------UTF8-----------------------
---------------UTF16-----------------------
open file tPath
read from file tPath until EOF
close file tPath
put it into myVariable
put uniEncode(myVariable,"UTF8") into field "PreXML"
delete file tPath
open file tPath for binary write
write field "PreXML" to file tPath
close file tPath
---------------UTF16-----------------------
end mouseUp
------------------------------------------------
function bom
set useUnicode to true
return numToChar(abs(baseConvert("FEFF",16,10)))
end bom
------------------------------------------------
**Best regards,
**rol4leg
Re: Need help with unicode and xml
Posted: Fri Aug 04, 2006 6:11 pm
by DarScott
tsalagi wrote:The problem is, I have one field in Cherokee syllabary (entered directly into my Revolution field), which needs to be saved in the xml file. I have read everything I can find about Rev and unicode, but I can't get anything to work correctly! I get garbage in my xml file every time.
Because of the way UTF-8 is encoded, the XML parsers just might work with that. Try converting your text and see.