How to use UTF-8 characters like german umlauts or others in view pages
pete007 Feb 22, 2008 2:08 AMHi, this is one of the seam-gen generated views, which I have to make german-special-chars-ready (Umlaute).
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:s="http://jboss.com/products/seam/taglib"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:rich="http://richfaces.org/rich"
template="layout/template.xhtml">
<ui:define name="body">
<h:messages globalOnly="true" styleClass="message" id="globalMessages"/>
<rich:panel>
<f:facet name="header">Holiday</f:facet>
<s:decorate id="day" template="layout/display.xhtml">
<ui:define name="label">day</ui:define>
<h:outputText value="#{holidayHome.instance.day}">
<s:convertDateTime type="date" dateStyle="short"/>
</h:outputText>
</s:decorate>
<s:decorate id="description" template="layout/display.xhtml">
<ui:define name="label">description</ui:define>
#{holidayHome.instance.description}
</s:decorate>
<div style="clear:both"/>
</rich:panel>
<div class="actionButtons">
<s:button view="/HolidayEdit.xhtml" id="edit" value="Edit"/>
<s:button view="/#{empty holidayFrom ? 'HolidayList' : holidayFrom}.xhtml" id="done" value="Done"/>
</div>
</ui:define>
</ui:composition>I tried several stuff, all leading to errorpages, so maybe someone can tell me, what has to be done. Maybe it will help others to avoid some frustration too.
I want to use the special chars in the views directly (e.g. change the header, add extra texts), I want to use them as captions of buttons or generally as values of xml-params and I have them inside the database tables or generally inside the getter-methods of my entities.
I assume, I have to escape the chars somehow and import them in the document-start, but don't get it right.
If someone could edit the above example or point to a working view page example, I would be very happy.