hmm... perhaps i spoke to soon.  in some more testing i uploaded this file
(see attached) which failed.  but when i added the encoding="ISO-8859-1" to
the xml file it succeeded.  so it seems that the encoding must be specified
both in the XMLRPC message and in the XML file that is third parameter to
db.insertDocument.

is that correct?

thanks
dave

-----Original Message-----
From: David Viner [mailto:[EMAIL PROTECTED]
Sent: Monday, April 22, 2002 3:59 PM
To: [email protected]
Subject: RE: newbie question


thanks kurt.  that did it... here's the change:

in xmlrpc.inc:
in class xmlrpcmsg function xml_header():
ORIGINALLY:
  function xml_header() {
        return "<?xml version=\"1.0\"?>\n<methodCall>\n";
  }

NOW:
  function xml_header() {
        return "<?xml version=\"1.0\"
encoding=\"ISO-8859-1\"?>\n<methodCall>\n";
  }


-----Original Message-----
From: Kurt Ward [mailto:[EMAIL PROTECTED]
Sent: Monday, April 22, 2002 3:38 PM
To: [email protected]
Subject: Re: newbie question


I'm pretty sure this is an encoding problem with the way strings are handled
in 1.0 where the encoding was
changed from ISO-8859 to UTF-8.  The current XML-RPC plugin currently sends
messages with the default
 ISO-8859.  We are currently working on a new API for the server that will
change all of this pretty soon.
In the meantime, I think in the XML-RPC configuration for PHP you can
specify the encoding.

Kurt

----- Original Message -----
From: "David Viner" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Monday, April 22, 2002 6:02 PM
Subject: newbie question


> hi
> i'm trying to insert a document thru the XMLRPC interface to xindice. but
i
> continue getting this error message:
> java.lang.StringIndexOutOfBoundsException: String index out of range: -1
>
> also in my console window in which xindice was started I get this error
> message:
> Fatal error parsing XML: Document contains illegal control character with
> value 0
>
> i can successfully insert a small version of the file.  but when i add
this
> line:
>
> <para>As the 6th leading cause of chronic disease in America, allergies
> deserve a serious look.</para>
>
> i get the error messages described.  this additional line of xml doesn't
> look particularly harmful nor peculiar, so i think i'm just missing
> something obvious.  is there some size limit?
>
> thanks
> dave


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


<?xml version="1.0"?>
<!-- edited with XML Spy v4.3 U (http://www.xmlspy.com) by Dave Viner (Yahoo) -->
<article>
	<title>Children and Asthma</title>
	<titleabbrev>Children</titleabbrev>
	<articleinfo>
		<author>
			<firstname>Dinah</firstname>
			<surname>Darvas</surname>
		</author>
		<publisher>
			<publishername>ISL Consulting, Co.</publishername>
		</publisher>
		<pubdate>2002</pubdate>
		<!--Copyright will be displayed as "Copyright &copy; 2002 Healthy Minds, Inc."-->
		<copyright>
			<year>2002</year>
			<holder>
				<ulink url="http://www.islco.com";>ISL Consulting, Co.</ulink> All rights reserved.</holder>
		</copyright>
		<copyright>
			<year>2002</year>
			<holder>
				<ulink url="http://XXXXXXX";>XXXXXX</ulink> All rights reserved.</holder>
		</copyright>
	</articleinfo>
	<!-- highlights is the text that will appear on the archive page. First sentence. -->
	<highlights>
		<para>
	Asthma is a lung disease in which the lungs are obstructed and breathing becomes difficult.
	</para>
	</highlights>
	<!-- the is the main body of the article 
sections must contain 'title' which is used as a smaller heading for that section.
-->
	<mediaobject>
		<imageobject>
			<imagedata fileref="asthmaimages/asthmakids.jpg" format="JPEG"/>
		</imageobject>
	</mediaobject>
	<section>
		<title>What is asthma?</title>
		<para>Asthma is a lung disease in which the lungs are obstructed and breathing becomes difficult. It is caused by overreaction of the airways to various triggers. A trigger is any substance that provokes asthma symptoms, such as pollen, dust, smoke, exercise or even cold air.
		</para>
		<para>Asthma is the number one chronic illness among children and is the most common cause of hospitalization for children under 15 years old.
		</para>
	</section>
	<section>
		<title>Children with asthma can have active lives</title>
		<para>Asthma symptoms can be a frustration for anyone, let alone for active children and teenagers. While asthma is not a curable illness, symptoms can be controlled and children can lead active, energetic lives.
		</para>
	</section>
	<section>
		<title>What if you suspect your child has asthma?</title>
		<para>Learn which triggers provoke asthma-like symptoms in your child by keeping an asthma diary. Do symptoms occur during or some time after exercise? Indoors or outdoors? After eating a specific food? In the winter or all year round? Consult with your doctor and ascertain the severity of his or her condition by performing allergen tests and or pulmonary function surveys.
		</para>
	</section>
	<section>
		<title>What if your child has asthma?</title>
		<para>Know that asthma is a controllable problem. The severity and frequency of asthma symptoms can be reduced and in some cases eliminated. With proper management, your child can partake in normal daily activities and lead a full and active life.
		</para>
	</section>
	<section>
		<title>What should you do?</title>
		<para>Learn all you can about what your child's asthma triggers. Minimize triggers such as dust and pet dander and teach your child to avoid them as much as possible.
		</para>
		<para>Thoroughly understand your child's medications. While you are an integral part of their support system and will still monitor them, it is important that children should know how to take their medications and how often. Teenagers should be responsible for managing their own treatment. By learning to gauge their own situation, the onset of symptoms and how to respond, teenagers can take control of their lives and feel more confident.
		</para>
	</section>
	<section>
		<title>A bright future</title>
		<para>Fortunately, with the help of today's medications it is no longer necessary to accept the limitations that asthma once imposed. If your child wishes to, he or she can join the ranks of the many Olympic athletes, such as Jackie Joyner-Kersee and Tom Dolan, who have also overcome the symptoms of asthma.
		</para>
	</section>
</article>

Reply via email to