Hi
In March 2007 we had a long discussion about the encoding of UTF-8 characters and Manakin, in the manakin list..
I am testing dspace-1.5 to put into production at www.jobim.org.
With this discussion in March, with the help of Scott Phillips, Afonso Comba Neto and Samu Viita, I could make search and browse work with UTF-8 accented characters. The submission aspect was also working fine without modifications. It is still working at www.jobim.org/dspace-xmlui.

The code for search and browse in 1.5 is again not working but I can fix it in the same way I did one year ago.
The new submission code does not work and I cannot understand why.

my configuration is:
in [tomcat]/conf/server.xml

        <!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->
<Connector port="8080" maxHttpHeaderSize="8192" maxThreads="150" minSpareThreads="25" maxSpareThreads="75" enableLookups="false" redirectPort="8443" acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true" URIEncoding="UTF-8"/> <!-- Note : To disable connection timeouts, set connectionTimeout value
     to 0 -->

in webapp/dspace-xmlui/WEB-INF/web.xml

 <!--
Set encoding used by the container. If not set the ISO-8859-1 encoding
            will be assumed.
Since the servlet specification requires that the ISO-8859-1 encoding is used (by default), you should never change this value unless
            you have a buggy servlet container.
        -->
        <init-param>
            <param-name>container-encoding</param-name>
            <param-value>ISO-8859-1</param-value>
        </init-param>

        <!--
Set form encoding. This will be the character set used to decode request parameters. If not set the ISO-8859-1 encoding will be assumed.
        -->
        <init-param>
            <param-name>form-encoding</param-name>
            <param-value>UTF-8</param-value>
        </init-param>

Here I have a question:
"the servlet specification requires that the ISO-8859-1 encoding is used" .
_will this work for sites using asian characters like japanese ?

the problem we had last year and now for the search and the browse was:
whenever we had URLs using parameters we had to change the form- encoding back to ISO-8859-1 and use the method GET for the forms. We did that modifying some aspect code for the form method, the theme xsl and modifying ArtifactBrowser/sitemap.xmap

<map:components>
    ...............
                <map:actions>
                        <map:action name="SendFeedbackAction"
src="org.dspace.app.xmlui.aspect.artifactbrowser.SendFeedbackAction"/>
                        <map:action name="set-encoding"
                                
src="org.apache.cocoon.acting.SetCharacterEncodingAction"/>
                </map:actions>
   ................
</map:components>

and

inside the map:pipelines:

                        <!-- Search -->
                        <map:match pattern="search">
                                <map:transform type="SimpleSearch"/>
                                <map:act type="set-encoding">
                                        <map:parameter name="form-encoding" 
value="ISO-8859-1"/>
                                </map:act>
                                <map:serialize type="xml"/>
                        </map:match>
                        <map:match pattern="simple-search">
                                <map:transform type="SimpleSearch"/>
                                <map:act type="set-encoding">
                                        <map:parameter name="form-encoding" 
value="ISO-8859-1"/>
                                </map:act>
                                <map:serialize type="xml"/>
                        </map:match>
                        <map:match pattern="advanced-search">
                                <map:transform type="AdvancedSearch"/>
                                <map:act type="set-encoding">
                                        <map:parameter name="form-encoding" 
value="ISO-8859-1"/>
                                </map:act>
                                <map:serialize type="xml"/>
                        </map:match>

this has been done for all necessary patterns in browse and search
I have already fixed the search in dspace-1.5_xx and I think I am going to do it for the browse too but:
Is that the correct fix?, will this work for a japanese or chinese site?

In the case of the summit aspect we dont have this mix of parameters passed in the URLs and POST forms. it is simply a post form that should work with the current configuration. some other forms using post are working like in the item edit form (not in submission describe form) and add e-people form. Note: in all this e-mail when I say "working" I mean "working with UTF-8 accented characters.

I think the email is already quite long.
I just wanted to bring this discussion to the dspace-tech list because the jspui has no problems at all with encoding and some one could bring light to the topic.
Thanks
Paulo Jobim


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to