From: Haejoong L. <hae...@un...> - 2002-08-08 22:10:49
|
Matthias, Have you tried 'encoding' option to load the file? 'encoding' option is available for AIF loader. Here is an example code: package require ag array set sig {} set opt(encoding) UTF-8 AG::Load AIF timit.xml "" sig opt ... XercesC++ FAQ says that: Xerces-C has intrinsic support for ASCII, UTF-8, UTF-16 (Big/Small Endian), UCS4 (Big/Small Endian), EBCDIC code pages IBM037 and IBM1140 encodings, ISO-8859-1 (aka Latin1) and Windows-1252. This means that it can parse input XML files in these above mentioned encodings. Thanks, Haejoong On Thu, Aug 08, 2002 at 08:05:34PM +0200, Matthias Thomae wrote: > Hello agtk developers, > > I have just stumbled over a non-ASCII label which I added as a feature > value to an annotation graph via the tcl wrapper, and saved the > resulting AGSet in AIF Format. > > When trying to read that file back, I get an error message like: > > loading agset from file Test.xml...agf:Expected end of tag 'Feature' > Error in startup script: LoadErroragf:Expected end of tag 'Feature' > while executing > "AG::load "AIF" $agSetFileName" > > I checked the XML file, and apparently the characters are saved 'as-is', > which was the source of the error. I had a similar problem in a > different matter, and solved it by storing the data as UTF-8. That meant > converting all strings read to and from the XML document via the parser, > using helper functions like "iso2utf8 and utf82iso". > > Is that something the AG Library user has to take care of, or should > that be implemented in the library itself? > > Regards. > Matthias > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > agtk-devel mailing list > agt...@li... > https://lists.sourceforge.net/lists/listinfo/agtk-devel |