[
https://issues.apache.org/jira/browse/SLING-9958?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17301758#comment-17301758
] Radu Cotescu commented on SLING-9958: ------------------------------------- The HTL Compiler uses a Reader to read the HTML file it will compile - https://github.com/apache/sling-org-apache-sling-scripting-sightly-compiler/blob/246afa39ba92bc8aaf6e1042e393aeed4823a92b/src/main/java/org/apache/sling/scripting/sightly/compiler/SightlyCompiler.java#L183. This will in turn have the encoding the client defined: https://github.com/apache/sling-org-apache-sling-scripting-sightly-compiler/blob/246afa39ba92bc8aaf6e1042e393aeed4823a92b/src/main/java/org/apache/sling/scripting/sightly/compiler/CompilationUnit.java#L43 In the Script Engine implementation, we again use a {{Reader}}. However, this is controlled by the {{DefaultSlingScript}} and defaults to UTF-8: https://github.com/apache/sling-org-apache-sling-scripting-core/blob/3d910d1624c940b390e9163c24b6ffaa24287262/src/main/java/org/apache/sling/scripting/core/impl/DefaultSlingScript.java#L157 > HTL Scripting Engine: Document supported encodings > -------------------------------------------------- > > Key: SLING-9958 > URL: https://issues.apache.org/jira/browse/SLING-9958 > Project: Sling > Issue Type: Improvement > Components: Scripting > Reporter: Konrad Windszus > Assignee: Radu Cotescu > Priority: Major > > Neither from the HTL spec (https://github.com/adobe/htl-spec) nor from the > documentation at > https://sling.apache.org/documentation/bundles/scripting/scripting-htl.html > it is clear which encoding is supported for *.html files by the Sightly > Compiler. > I guess it assumes UTF-8, but it would be good to document that. -- This message was sent by Atlassian Jira (v8.3.4#803005)
