The encoding attribute specifies the preferred encoding to be used. The html output method should add a META element immediately after the start-tag of the HEAD element specifying the character encoding actually used. This stylesheet outputs in UTF-8, This stylesheet in UTF-16, and This stylesheet in Cp1250. In This stylesheet look at the source of the lowest middle window in your browser. The xml source contains characters which are not present in specified character set and they are therefore escaped.