spring-framework / org.springframework.web.reactive.result.view.freemarker / FreeMarkerView / setEncoding

setEncoding

open fun setEncoding(@Nullable encoding: String): Unit

Set the encoding of the FreeMarker template file.

By default FreeMarkerConfigurer sets the default encoding in the FreeMarker configuration to "UTF-8". It's recommended to specify the encoding in the FreeMarker Configuration rather than per template if all your templates share a common encoding.