codeconsole commented on code in PR #15976:
URL: https://github.com/apache/grails-core/pull/15976#discussion_r3565398892


##########
grails-rest-transforms/src/main/groovy/org/grails/plugins/web/rest/render/html/DefaultHtmlRenderer.groovy:
##########
@@ -47,6 +48,8 @@ class DefaultHtmlRenderer<T> implements Renderer<T> {
 
     String suffix = ''
 
+    String encoding = GrailsWebUtil.DEFAULT_ENCODING

Review Comment:
   Good call — done in 814b384df6. The encoding is now wired from 
configuration: `DefaultRendererRegistry` gained an `encoding` property that it 
propagates to every default renderer it creates (HTML, JSON, XML, and the 
`Errors` container renderers, plus the fallback HTML renderers the JSON/XML 
renderers construct when no view matches), and `RestResponderGrailsPlugin` 
populates it from the existing `grails.converters.encoding` setting, falling 
back to UTF-8 when unset. I reused that key rather than introducing a new one 
since these renderers are part of the same `respond()` pipeline the converters 
serve — one knob for response encoding. The setting is also documented in 
`additional-spring-configuration-metadata.json` so IDEs offer completion for 
it. Renderers registered as beans keep the independently settable `encoding` 
property. Covered by new specs at renderer level (custom encoding reaches the 
content type) and registry level (propagation to all default renderers).



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to