Why does UTF-8 not work for labels in Vaadin?

Hi!

I have issues with åäö (Swedish characters) and I wonder why they become ??? in labels in Vaadin.
Is there any configuration I have exclude without noticing it?

I’m using Spring boot with Vaadin.

Are these strings loaded from a ResourceBundle, or from a DB, or are they hardcoded in your java code?

Kaspar Scherrer:
Are these strings loaded from a ResourceBundle, or from a DB, or are they hardcoded in your java code?

They are hardcoded in java code.

What’s the encoding of your Java files? At least Eclipse uses Cp1250 by default on Windows machines, which may cause issues.

Olli Tietäväinen:
What’s the encoding of your Java files? At least Eclipse uses Cp1250 by default on Windows machines, which may cause issues.

Yes! I’m using Eclipse and Windows. Perhaps that’s where the issue is?

Daniel Mårtensson:

Olli Tietäväinen:
What’s the encoding of your Java files? At least Eclipse uses Cp1250 by default on Windows machines, which may cause issues.

Yes! I’m using Eclipse and Windows. Perhaps that’s where the issue is?

Could be. Try switching the encoding to UTF-8: https://stackoverflow.com/questions/3751791/how-to-change-default-text-file-encoding-in-eclipse

Olli Tietäväinen:

Daniel Mårtensson:

Olli Tietäväinen:
What’s the encoding of your Java files? At least Eclipse uses Cp1250 by default on Windows machines, which may cause issues.

Yes! I’m using Eclipse and Windows. Perhaps that’s where the issue is?

Could be. Try switching the encoding to UTF-8: https://stackoverflow.com/questions/3751791/how-to-change-default-text-file-encoding-in-eclipse

Yes! Thank you. That works!