Re: jForum Portlet (Turkish Character Encoding Problem)

Khaled TLILI <[email protected]> Fri, 13 Jul 2007 15:00:22 +0200
Newsgroups gmane.comp.cms.jahia.install
Message-ID <[email protected]>
Hi,

You can find jforum_portlet src at this url:
http://svn.jahia.org/svn/jforum_portlet/trunk/

Source code of jforum has not been modified (only bug fix).  We 
developped a bridge that allows to install Jforum as a portlet.

The src of the bridge is here:
http://svn.jahia.org/svn/jforum_portlet/trunk/src/org/jahia/portlet/jforum/

Mainly, JForum Portlet Bridge is a set of wrappers that allows to 
convert Portlet objects into Servlet Objects (ex.: ActionRequest --> 
HttpServletRequestWrapper(...)).

Encoding is set here:
http://svn.jahia.org/svn/jforum_portlet/trunk/src/org/jahia/portlet/jforum/JForumPortletBridge.java

public void processAction(ActionRequest request, ActionResponse response) {
        try {
            *request.setCharacterEncoding(SystemGlobals.getValue(ConfigKeys.ENCODING));*
        }
        catch (UnsupportedEncodingException ex) {
            ex.printStackTrace();
        }
        logger.debug("-- Begin process method--");
        // send parameter to render request phase
        Enumeration paramsName = request.getParameterNames();

        while (paramsName.hasMoreElements()) {
            String name = (String) paramsName.nextElement();
            String[] values = request.getParameterValues(name);
            response.setRenderParameter(name, values);
            logger.debug("Found parameter in processAction method: " + name + "," + values[0]);
        }

        //deal with file upload
        boolean isFileUpload = isMultipartContent(request);
        if (isFileUpload) {
            handleMultipartRequest(request, response);
        } else {
            logger.debug("It's no a file Upload.");
        }

        //validate procees action
        validateProcessAction(request);

        logger.debug("-- Finish process method--");

    }

Regards,

KT.





Hakan Tekinaslan a écrit :
> Hello Sergiy,
>
> We're using jForum 2.1.5 as portlet. And we're not using Jahia, we've 
> deployed portlet into uPortal.
>
> Thanks
>
> Sergiy Shyrkov wrote:
>> Hi Hakan,
>>
>> which version (and probably the build number) of Jahia do you use?
>>
>> Kind regards
>> Sergiy
>>
>> Hakan Tekinaslan schrieb:
>>   
>>> Hello,
>>>
>>> We're facing an encoding problem with jForum Portlet. Our MySQL database 
>>> is UTF-8 and portlet's Contfiguration is set to UTF-8 too. When we post 
>>> a new message or topic with these settings they are shown like 
>>> ıııüğüşişçöç. When we change portlet's character enconding 
>>> configuration to ISO-8859-9 (Turkish) they are shown correctly. But then 
>>> we post new messages with these settings, the data is inserted wrong 
>>> into database and cannot be shown properly.
>>>
>>> So we couldn't find what to do, it doesn't work with database which is 
>>> ISO-8859-9 eighter.
>>>
>>> Can we get source code of portlet from somewhere? Or does anyone know 
>>> how to solve this?
>>>
>>> Note : We've connected a stand alone jForum application which is not 
>>> portlet to the same database. It works properly and there is no encoding 
>>> problem with it.
>>>
>>> Thanks for your interest.
>>> Hakan
>>> _______________________________________________
>>> install_list mailing list
>>> [email protected]
>>> http://lists.jahia.org/cgi-bin/mailman/listinfo/install_list
>>>   
>>>     
>>
>> _______________________________________________
>> install_list mailing list
>> [email protected]
>> http://lists.jahia.org/cgi-bin/mailman/listinfo/install_list
>>   
>
> -- 
> ------------------------------------------------------------------------
>
> *Hakan Tekinaslan*
> Bilgi Teknolojisi / Uygulama Sorumlusu
> Sabancı Üniversitesi
> *Tel :* 0 (216) 483 91 95
> Orhanlı 34956 Tuzla-İstanbul
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> install_list mailing list
> [email protected]
> http://lists.jahia.org/cgi-bin/mailman/listinfo/install_list
>   

_______________________________________________
install_list mailing list
[email protected]
http://lists.jahia.org/cgi-bin/mailman/listinfo/install_list