From: Matthias T. <th...@ei...> - 2002-08-09 11:00:04
|
Hello Haejoong, Haejoong Lee wrote: > 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 > ... Ok, I didn't know that. I tried it, but it made no difference, I still get the same error, no matter if the encoding is set to UTF-8, ISO-8859-1 or ASCII. By the way, as I understand from the sources, UTF-8 is the default encoding. I think the problem is on the 'other side', when *building* annotation graphs and storing them in AIF format via the "toXML" function. It is not possible to set the encoding of the input strings, as far as I have seen. I have also noticed that the AG library creates the XML document "by hand", not using the DOM XML document building functions of Xerces. Let me take some guesses about this: Since you seem to use C++ strings (ASCII) in the AG library, the encoding of the generated document is always ASCII. Using the DOM to build the XML document would allow you to set different encodings. Regards. Matthias |