Messages and growl encoding remove apostrophes

UI Components for JSF
Post Reply
informatica.soib
Posts: 11
Joined: 28 Aug 2019, 10:09

17 Sep 2021, 09:59

Environment:
- JBoss 7.2
- Java 14
- Mojarra 2.3.5
- PF10

I have a basic web page where the messages.properties works well when I use a h:ouptut but it removes apostrophes. I guess that must be related with encoding but not sure how to fix it.

Message.property (UTF8)-> error=S'han d'establir dates d'inici i final de l'acció formativa.

Message on xhtml -> S'han d'establir dates d'inici i final de l'acció formativa.

Message on p:growl or p:messages -> Shan destablir dates dinici i final de lacció formativa.

Code: Select all

<ui:fragment xmlns="http://www.w3.org/1999/xhtml"
             xmlns:h="http://xmlns.jcp.org/jsf/html"
             xmlns:p="http://primefaces.org/ui"
             xmlns:ui="http://xmlns.jcp.org/jsf/facelets">

    <!-- Missatges d'usuari -->
    <h:form id="frmMessages">
        <p:outputPanel id="pnlMessages">
           <p:growl id="growl" showDetail="true" showSummary="true" life="9000" severity="info,warning,error,fatal" >
                <p:autoUpdate/>
            </p:growl>

            <p:messages id="msgs" showDetail="true" showSummary="true" closable="true" severity="error,fatal"/>
        </p:outputPanel>
    </h:form>

</ui:fragment>

Melloware
Posts: 3717
Joined: 22 Apr 2013, 15:48

22 Sep 2021, 14:24

It should not be removing apostrophes. My apps don't do that so something must be off in your app either they are "not apostrophes" and are some crazy UTF-16 character or your UTF-8 encoding for your app is not set up right? But apostrophe is a standard character so it should be fine.

If you can create a PrimeFaces Test reproducer I can look at it. Use this to create a small reproducible example: https://github.com/primefaces/primefaces-test
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 29 guests