Bug 794384 (JBEPP-1428) - Unicode characters handling problem
Summary: Unicode characters handling problem
Keywords:
Status: CLOSED NEXTRELEASE
Alias: JBEPP-1428
Product: JBoss Enterprise Portal Platform 5
Classification: JBoss
Component: unspecified
Version: 5.2.0.CR03
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 5.2.1.GA
Assignee: Ken Finnigan
QA Contact:
URL: http://jira.jboss.org/jira/browse/JBE...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-12-01 16:37 UTC by Miroslav Cupák
Modified: 2015-01-05 11:59 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
HTTP Request parameters were retrieved before the character encoding was set to UTF-8. The default character encoding of ISO-8859-1 was used instead, leading to corrupted characters. The fix ensures character encoding is set to UTF-8 before Request parameters are accessed. Correct unicode characters are now returned in form posts.
Clone Of:
Environment:
Last Closed: 2012-02-01 15:36:28 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker JBEPP-1428 0 Major Closed Unicode characters handling problem 2017-07-20 15:03:00 UTC

Description Miroslav Cupák 2011-12-01 16:37:11 UTC
Steps to Reproduce: * Use the _JSF Car Booking_ example from the _portletbridge_ directory in the EPP bundle. Deploy it and start the server.
* Put the application on a page and access it. Choose _Spanish_ as the language in the first step.
* Confirm all the steps until you get to the _Customer Details_ form.
* Choose _Senor_ in the select (default value). Fill in _Primer Nombre_, _Código postal_ and _Numero de carta de crédito_ with some strings to avoid validation errors.
* Submit the form.
* If everything worked, you would be directed to the next page. This doesn't happen now because of the value in the select containing a "special" character (note: the other fields are fine since you don't see any error messages in the form).
project_key: JBEPP

_Scenario:_ I have a form in a JSF application. I submit the form with the fields containing Unicode characters and the validation fails even though the values are correct. I narrowed the problem down to Spanish characters getting messed up before the validation takes place.

This is not an issue with EPP 5.1.1.GA and it must have been caused by a change in EPP, i.e. even though it is a JSF application used over Portlet Bridge, it looks like it's neither PBR nor an example problem - the same example with the same version of Portlet Bridge works fine on EPP 5.1.1 and doesn't work on EPP 5.2.0.

Comment 1 Miroslav Cupák 2011-12-01 16:53:12 UTC
Link: Added: This issue is related to JBQA-5579


Comment 2 Jared MORGAN 2011-12-02 03:16:04 UTC
Release Notes Docs Status: Added: Not Required


Comment 8 Ken Finnigan 2012-01-31 17:04:12 UTC
Link: Added: This issue depends GTNPORTAL-2342


Comment 9 Ken Finnigan 2012-02-01 15:36:28 UTC
Release Notes Docs Status: Removed: Not Required Added: Not Yet Documented
Release Notes Text: Added: CAUSE

HTTP Request parameters were retrieved before the character encoding was set to UTF-8

CONSEQUENCE

The default character encoding of ISO-8859-1 was used instead, leading to mangled characters

FIX

Set the character encoding to UTF-8 before Request parameters are accessed

RESULT

Correct unicode characters are returned in form posts


Comment 10 Jared MORGAN 2012-03-26 04:41:07 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
HTTP Request parameters were retrieved before the character encoding was set to UTF-8. The default character encoding of ISO-8859-1 was used instead, leading to corrupted characters. The fix ensures character encoding is set to UTF-8 before Request parameters are accessed. Correct unicode characters are now returned in form posts.

Comment 11 Andrew 2012-09-11 16:58:19 UTC
Hi. Our portal runs on SLES version 10.2 and after upgrading the portal to version 5.2.1, I tried the Car booking example (I got the code from JBOSS EPP 5.1.0 Src in the portlet bridge folder but modified the structure a bit (no code change though) by selecting French on the "choose locale" page, then at the customer details page, I put in some french characters "HéÁb" in the "Prénom" field. After clicking on the submit button, the last page shows the characters as "HéÃb", which is different from what I put in.

Note that if I put my portal on a Windows box (Windows 7), the problem does not occur (i.e. Portal version 5.2.1 fixes this problem for Windows).

Does this mean the bug fix doesn't work on Linux? Is it possible to get a patch to fix it? Our application is multi-lingual and is dependent on a fix for this.

I can upload the source code (with the modified structure) or the war file, and build.xml file I use upon request.

Thanks in advance for answering.

  -Andrew

Comment 12 Ken Finnigan 2012-09-11 18:08:56 UTC
Andrew,

If you're running EPP as a supported customer, then you should be creating Red Hat customer portal tickets for issues such as these, so that support can properly handle and log them.

From the above it sounds like you are using the version of Portlet Bridge from EPP 5.2.0 with 5.2.1, this is generally not recommended and you should use the version of the Portlet Bridge that was shipped with EPP 5.2.1

Ken

Comment 13 Andrew 2012-09-11 18:35:22 UTC
Hi, Ken. Thanks for the tip. This could be a stupid question : Where is the portlet bridge that was shipped with EPP 5.2.1? The portlet bridge that I'm using is something that I downloaded from the JBoss Portlet Bridge site (version 2.2.0).
I know there is a newer 2.3.1 now, but if there is one that was shipped with EPP 5.2.1, I should use that one. But I can't find it.

  -Andrew

Comment 14 Ken Finnigan 2012-09-11 19:04:57 UTC
Andrew

Inside the EPP v5.2.1 zip download, in the following directory you can find the Portlet Bridge for EPP: /jboss-epp-5.2/portletbridge/

Ken

Comment 15 Andrew 2012-09-11 20:22:36 UTC
Thanks Ken. The problem still exists when I use portlet bridge version 2.3.0 (the version that comes with EPP 5.2.0) or version 2.3.1 (the latest 2.x version) from JBoss Portlet Bridge website. Will create a support ticket for this.

Thanks.

  -Andrew


Note You need to log in before you can comment on or make changes to this bug.