MyFaces Core
  1. MyFaces Core
  2. MYFACES-2734

Character encoding not set correctly before Restore View


    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.1-SNAPSHOT
    • Fix Version/s: 2.0.1
    • Component/s: JSR-314
    • Labels:


      In my examples I have a phase listener that outputs all request parameters. I accidentially did this before restore view and got some strange behaviour. With MyFaces 2.0, reading the request parameters before the restore view phase kills german umlauts. This happens because the character encoding is calculated and set in the request at the beginning of restore view but after the before phase listeners are executed.

      As this is not happening with Mojarra, I set a breakpoint in ServletRequest.setCharacterEncoding and saw that they are setting this somewhere at the beginning of the lifecycle.

      I quickly checked the spec but the only thing I found regarding the character encoding was at the beginning of restore view (which is done correctly in MyFaces). But I wonder if it should not be set earlier as, like in my case, an earlier access to the request parameters kills umlauts. This might also be necessary for extensions doing something with request parameters in a before restore view listener.

      1. MYFACES-2734.patch
        2 kB
        Michael Kurz
        8 kB
        Michael Kurz
      3. MYFACES-2734-doPrePhaseActions.patch
        11 kB
        Jakob Korherr


        Leonardo Uribe made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Leonardo Uribe made changes -
        Fix Version/s 2.0.1 [ 12315117 ]
        Fix Version/s 2.0.1-SNAPSHOT [ 12314891 ]
        Jakob Korherr made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Fix Version/s 2.0.1-SNAPSHOT [ 12314891 ]
        Resolution Fixed [ 1 ]
        Jakob Korherr made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Jakob Korherr made changes -
        Attachment MYFACES-2734-doPrePhaseActions.patch [ 12445767 ]
        Jakob Korherr made changes -
        Assignee Jakob Korherr [ jakobkorherr ]
        Michael Kurz made changes -
        Attachment [ 12445315 ]
        Michael Kurz made changes -
        Field Original Value New Value
        Attachment MYFACES-2734.patch [ 12445314 ]
        Michael Kurz created issue -


          • Assignee:
            Jakob Korherr
            Michael Kurz
          • Votes:
            0 Vote for this issue
            0 Start watching this issue


            • Created: