Star Hype News.

Premium celebrity moments with standout appeal.

updates

Mismatched charset while executing application on Windows and Wine (Ubuntu)

By James Williams

We have a small exe client application that used for loading the scanned images from the remote sources, what we need to do is enter the address from the images to specific text box and submit. The data then will be saved in remote database and will be read by another apps.

When we run the client application on Windows, everything is normal. The problem only happen when we run application on Ubuntu via Wine: Whether we input the address that contain German characters, the other apps will read from database the wrong characters, for example:

What we enter: Lößnitzstr

What the other apps see: Lößnitzstr

Input:

Screenshot 1

Output:

Screenshot 2

We found out this is caused by a charset mismatch when encoding with UTF-8 and decode with Windows-1252 code page.

Since the default charset of Ubuntu is UTF-8, we tried to use command line to force WINE to run with Windows charset setting:

LANG=de_DE.CP1252 wine client.exe

We also tried to set the operating system default locale by localectl to language with charset Windows-1252 (CP1252) but it seems not to work

Locale:

Screenshot 3

Wine version 7.0

Ubuntu Version 20.04

Any idea how to fix this? really appreciate your help.

2 Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy