Facelets is XML-based and is processed by the XML parser. — is an HTML object and is not recognized in XML. Only five listed on this Wikipedia page , " , & , ' , < and > are recognized in XML.
Facelets / XML already uses UTF-8 by default, so you can just put the actual plain / unencoded character in the template (assuming the editor can save the file as UTF-8).
<h:link value="#{somethingHere} — #{anotherHere}">
If for some reason this is not an option, you can instead use the numeric character reference in the format &#nnnn; , for example, how to use   for presentation in XML. You can find the digital link in fileformat.info: Unicode Character 'EM DASH' (U + 2014)
Encodings
HTML entity (decimal) —
So this should do for you:
<h:link value="#{somethingHere} — #{anotherHere}">
An alternative that should satisfy the exact error is to declare an explicit object reference in doctype.
<!DOCTYPE html [ <!ENTITY mdash "—"> ]>
But this is not a general recommendation / approach, since you will need to repeat this for each XML file in which the symbol is used.
source share