Recently I moved from Tomcat 8.5 with Java 8 running on 64bit Amazon Linux/3.4.21 to Tomcat 8.5 with Corretto 11 running on 64bit Amazon Linux 2/4.3.0 AWS server, both are using Mojarra 2.2.20 implementation.

Since then, codes with <f:convertNumber/> which displays currency symbols, like:

  <h:outputText value="#{c.value}"   >
        <f:convertNumber  type="currency" locale="#{utilBean.user.myLocale}" />
  </h:outputText>
                                 

are having different behaviour on HTML pages... in my old server it render eg.: '$ 100,00' (with normal space, which is what I expect), and in new server it render '$$&nbsp;100,00' (which causes me a problem when exported to excel). All other 'spaces' cases, like String Bean variables are working just fine in any page.

Which (Tomcat?) configuration should I use to force ordinary spaces?

1

There are 1 best solutions below

0
edudoda On

I didn't find which configuration resulted in that problem, but as I'm using Primefaces and my problem was only related to exported values, I was dealing with that at backend, by removing this kind of space with: strVal = strVal.replace("\u00a0",""); in a postProcessor="#{exportBean.postProcessXLS}" method (another option was set exportValue="" atribute in each currency column removing currency symbol).

By the way, since I upgraded to new Primefaces 12 the problem has gone because now Cells type are preserved and correctly exported.