Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

German umlauts (ä, ö and ü) not properly displayed and spoken. #63

Open
Binozo opened this issue Sep 4, 2021 · 3 comments
Open

German umlauts (ä, ö and ü) not properly displayed and spoken. #63

Binozo opened this issue Sep 4, 2021 · 3 comments

Comments

@Binozo
Copy link

Binozo commented Sep 4, 2021

Hello,
there is an issue with German umlauts.
When you send a response with ä, ö or ü, Google Assistant will not pronounce and display them correctly. For example, "ü" is displayed and spoken as "ü".
I found no information about this and I found nothing in the settings.

I tried to use the right charset for this.
String response = new String(responseBody.getBytes(StandardCharsets.UTF_8));
And the Text is displayed correctly in the console. (When I debug it locally)
{"fulfillmentText":"Diese Funktion wird derzeit noch nicht unterstützt...

Before I set the charset:
-> {"fulfillmentText":"Diese Funktion wird derzeit noch nicht unterst�tzt...
After I set the charset:
-> {"fulfillmentText":"Diese Funktion wird derzeit noch nicht unterstützt...

But the issue is, Google Assistant doesn't receive the Text correctly.
grafik

Any ideas how to fix this?

@Binozo
Copy link
Author

Binozo commented Sep 4, 2021

Update: This worked locally but not on production:
resp.getOutputStream().write(new String(("" + responseBody).getBytes(StandardCharsets.UTF_8), StandardCharsets.UTF_8).getBytes());

The biggest pain in the ass I've ever had.
grafik

@Binozo
Copy link
Author

Binozo commented Sep 4, 2021

I removed these lines
resp.setContentType("application/json; charset=UTF-8");
resp.setCharacterEncoding("UTF-8");

and it started working.

grafik

The Problem is, ä, ö and ü is UTF-8.
This is ridiculous.

@Binozo Binozo closed this as completed Sep 4, 2021
@Binozo Binozo reopened this Sep 22, 2021
@Binozo
Copy link
Author

Binozo commented Sep 22, 2021

Still same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant