commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sean W. Ferguson" <seansli...@comcast.net>
Subject Re: [jelly] How to post XML with Unicode characters?
Date Tue, 19 Aug 2003 17:58:59 GMT
Although if I set the encoding to UTF-8 in the jelly xml file, it cannot parse 
the xml document.  I have to set it to ISO-8859-1 for it to parse the document.

Bill Keese wrote:

> You could try doing everything as UTF-8 rather than ISO-8859-1.  Since 
> UTF-8 is the default encoding for XML files, you don't need a <?xml 
> version="1.0" encoding="ISO-8859-1"?> header.  Not sure if that would 
> solve your problem or not.
> 
> Bill
> 
> Sean W. Ferguson wrote:
> 
>> I am trying to post some XML that contains unicode characters to a 
>> server.  In the XML, if I set the encoding="ISO-8859-1" it works.  The 
>> problem is, I cannot set that in a jelly xml file for the post.
>>
>> Example:
>> <http:post var="request" uri="http://sean:8080/dictionary/universe">
>>   <http:header name="Content-Type" value="text/xml; charset=ISO-8859-1"/>
>>   <http:header name="Content-Encoding" value="ISO-8859-1"/>
>>   <http:body>
>>     <filerequest method="save" type="single">
>>       <file name="${name}">
>>         <core:forEach var="property" 
>> items="${bean.dynaClass.dynaProperties}">
>>           <field id="${property.name}">${bean.get(property.name)}</field>
>>         </core:forEach>
>>       </file>
>>     </filerequest>
>>   </http:body>
>> </http:post>
>>
>> It fails because some of the properties contain unicode characters. 
>> What I want is to append this to the top:
>> <?xml version="1.0" encoding="ISO-8859-1"?>
>> But when I do, jelly complains about multiple xml tags saying there 
>> can only be one.
>>
>> Any suggestions?
>>
>> Thanks
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>>
>>
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> 
> 


Mime
View raw message