UTF-8 / Umlaut Problem when App is moved locally to App Server

Hi

I have created a simple interface on Anvil containing German words:

2020-06-24 16-43-16

The German words contain umlauts, i. e. ‘ä’ or ‘ü’.

On anvil.works the umlauts are shown correctly when running the app.

I was able to clone the app locally and to run it on the Anvil App Server (really great!!!). However, what I get in the browsers (Chrome as well as Firefox) using the local version is:

grafik

As I am not a professional web programmer this behaviour is somehow depressing.

Any hints on how I can change the code already in the cloud such that the umlauts will be shown correctly locally as well?

Thanks

Vinz

2 Likes

Hi @frvi2,

That seems strange. I’ve tried to recreate the issue but so far the umlauts are displaying correctly in multiple browsers and when the app server is deployed to different environments.

Could you share the command you are using to run the app server along with any flags? For example: anvil-app-server --app app_name

Also, what operating system are you using?

Thanks,
Ryan

Hi Ryan

Thanks for your response.

The system is Windows 10 Enterprise, Version 1809 (System Language is Swiss German). I should probably try on an Ubuntu system or the like…

The command in PowerShell is

anvil-app-server --app .\Ypsomed_PatMap\

No Flags.

Kind regards,

Vinz

Hi

I have an update regarding the Umlaut Problem. One of our server guys finally was able to solve the problem.

As it turns out the problem is related to Windows 10 (not really a surpise).

It may be solved by setting or appending an option for Java: -Dfile.encoding=UTF-8

In the command prompt (for a single session) you may use:

set _JAVA_OPTIONS=%_JAVA_OPTIONS% -Dfile.encoding=UTF-8

Or you may set an according environment variable in your Windows account.

By default Windows uses (at least on my machine) CP-1252 encoding. The used option forces the use of UTF-8 and the Umlauts are produced correctly on the client page :grinning:.

Kind regards,

Vinz

4 Likes

Thanks for the information. It is really helpful.

Hi @frvi2,

Thanks for posting the solution to this. I thought I’d give you a quick update to say that I’ve raised this as an issue on the Anvil App Server repo: