Skip to content

Backport constructor accepting Charset in StringHttpMessageConverter, from Spring for Android to Spring Web. [SPR-9487] #14122

@spring-projects-issues

Description

@spring-projects-issues

Francisco Lozano opened SPR-9487 and commented

Spring for Android 's StringHttpMessageConverter has a very useful constructor which allows to specify a default charset different from ISO-8859-1:

/**
 * Create a new StringHttpMessageConverter instance with a default {@link Charset},
 * and default list of available {@link Charset}'s from {@link Charset#availableCharsets()}.
 * @param defaultCharset the Charset to use 
 */
public StringHttpMessageConverter(Charset defaultCharset) {
	this(defaultCharset, new ArrayList<Charset>(Charset.availableCharsets().values()));
}

Could this be backported to full Spring's StringHttpMessageConverter


Affects: 3.1.1, 3.2 M1

Issue Links:

Referenced from: commits 9aa43fc, 98b281e, a4240d2

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions