10-12-2007 11:38 AM
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
The html forms have this type and charset specified also:<form action="${url.serviceContext}/apply/postdoc08/edit?guest=true"
method="post"
enctype="multipart/form-data"
charset="utf-8">
I have a freemarker template applicant.xml.ftl that starts off <?xml version="1.0" encoding="UTF-8"?>
So everything should be utf8 right? Indeed if i edit my source xml document with extended characters, and save as UTF8 in TextEdit or Oxygen.app, then all my html pages render the text just fine. Those freemarker templates are xhtml, utf-8, and are loading the xml file thusly:<#assign dom=document.xmlNodeModel>
So that all works, but the problems arises when submitting the html form. The POST is received by a .js file, which applies the template and saves the result out to the repository. Here is where i think the character encoding is getting lost:var tScriptSpace = companyhome.childByNamePath( gPathToScriptSpace );
var tXMLTemplateNode = tScriptSpace.childByNamePath( gXMLTemplate );
var tArgs = formFieldsToArgsArray();
var tNewApplicantXMLStr = tApplicantXMLNode.processTemplate( tXMLTemplateNode, tArgs);
tApplicantXMLNode.content = tNewApplicantXMLStr;
10-19-2007 12:09 PM
<bean id="freeMarkerProcessor" parent="baseTemplateProcessor" class="org.alfresco.repo.template.FreeMarkerProcessor">
<property name="name">
<value>freemarker</value>
</property>
<property name="extension">
<value>ftl</value>
</property>
<property name="defaultEncoding">
<value>UTF-8</value>
</property>
</bean>
10-23-2007 04:02 PM
10-23-2007 04:57 PM
10-24-2007 03:24 AM
10-24-2007 12:50 PM
10-24-2007 12:51 PM
10-29-2007 05:04 PM
10-30-2007 07:04 AM
10-30-2007 01:01 PM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.