Skip to content

JAXB message converters ignore Content-Type charset #34745

Closed
@pax95

Description

@pax95

Hi

I have created a Stackoverflow with the details here https://stackoverflow.com/questions/79568225/restclient-message-converters-unable-to-parse-iso-8859-1-response-from-remote-se

It seems that setting the DefaultCharset on RestClient messageconverters doesn't have any effeft when marshalling a iso-8859-1 response.

Currently the workaround is to take the response as a string and then manually unmarshall to jaxb objects

var xml = woRestClient.get()
            .uri("myuri")
            .retrieve()
            .body(String.class);
        var programs = JaxbUtils.unmarshall(xml, Programs.class);

There is a simelar question here https://stackoverflow.com/questions/77663426/restclient-how-to-correctly-unmarshall-text-xml-response

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions