Calendar - Month label with accent

Locked
renatonegrao
Posts: 6
Joined: 13 Jan 2012, 15:34

11 Mar 2015, 03:50

Dear members,

The following situation is happening when was used the calendar in the following condition:

Code: Select all

<p:calendar id="dataEmissao" size="12" locale="pt" value="#{testBean.dataEmissao}" pattern="dd/MM/yyyy"  />
Primefaces.locales:

Code: Select all

PrimeFaces.locales['pt'] = {
				closeText: 'Fechar',
                prevText: 'Anterior',
                nextText: 'Proximo',
                currentText: 'Começo',
                monthNames: ['Janeiro','Fevereiro','Março','Abril','Maio','Junho','Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'],
                monthNamesShort: ['Jan','Fev','Mar','Abr','Mai','Jun', 'Jul','Ago','Set','Out','Nov','Des'],
                dayNames: ['Domingo','Segunda','Terça','Quarta','Quinta','Sexta','Sabado'],
                dayNamesShort: ['Dom','Seg','Ter','Qua','Qui','Sex','Sab'],
                dayNamesMin: ['D','S','T','Q','Q','S','S'],
                weekHeader: 'Semana',
                firstDay: 1,
                isRTL: false,
                showMonthAfterYear: false,
                yearSuffix: '',
                timeOnlyTitle: 'Só Horas',
                timeText: 'Tempo',
                hourText: 'Hora',
                minuteText: 'Minuto',
                secondText: 'Segundo',
                currentText: 'Agora',
                ampm: false,
                month: 'Mes',
                week: 'Semana',
                day: 'Dia',
                allDayText : 'Todo Dia'
            };

Code include at template.xhtml:

Code: Select all

<h:outputScript name="js/primefaces-locales.js" library="custom" />

The label of March (Março in portuguese) is being presented "Mar?o 2015" instead of "Março 2015".

This code/condition was already used in other project with sucess.

Could you please confirm if it's necessary any specific setting to solve this issue when the Sentinel Layout is used?

Thank you

Renato

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

11 Mar 2015, 11:37

I've tried your code and could not see the problem, maybe it is related to your file encoding of js?

Image

renatonegrao
Posts: 6
Joined: 13 Jan 2012, 15:34

12 Mar 2015, 00:22

You are right. After changing the encode of primefaces-locales.js to UTF-8 the problem was solved.

Thank you

Renato

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

12 Mar 2015, 22:49

Glad to hear!

Locked

Return to “Sentinel”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 14 guests