Skip to content
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.

Fix the issue with special characters - Changed the default charset to UTF-8 to support special characters #660

Closed
wants to merge 1 commit into from

Conversation

chsraju
Copy link

@chsraju chsraju commented Sep 15, 2020

Changed the default charset to UTF-8 to support special characters

@chsraju
Copy link
Author

chsraju commented Sep 16, 2020

This is to address the below reported issue
#645 (comment)

@chsraju chsraju changed the title Changed the default charset to UTF-8 to support special characters Fix the issue with special characters - Changed the default charset to UTF-8 to support special characters Sep 16, 2020
@maciejwalkowiak
Copy link
Contributor

Thanks @chsraju for contribution! Is it possible to also add a test that verifies this change?

@maciejwalkowiak maciejwalkowiak added component: sns SNS integration related issue type: enhancement A general enhancement and removed waiting-for-triage labels Sep 16, 2020
@maciejwalkowiak maciejwalkowiak added this to the 2.3 milestone Sep 16, 2020
@@ -127,7 +126,7 @@ public InputStream getBody() throws IOException {

private Charset getCharset() {
return this.mediaType.getCharset() != null ? this.mediaType.getCharset()
: Charset.forName(WebUtils.DEFAULT_CHARACTER_ENCODING);
: Charset.defaultCharset();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will use default charset from OS. According to SNS docs, strings are encoded with UTF-8 so perhaps instead we should use here StandardCharsets.UTF_8?

@maciejwalkowiak maciejwalkowiak added type: bug A general bug and removed type: enhancement A general enhancement labels Oct 6, 2020
maciejwalkowiak pushed a commit to awspring/spring-cloud-aws that referenced this pull request Dec 19, 2020
juho9000 pushed a commit to juho9000/spring-cloud-aws that referenced this pull request Apr 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
component: sns SNS integration related issue type: bug A general bug
Development

Successfully merging this pull request may close these issues.

3 participants