CP 65001 (utf-8), printf behaviour differences

Moritz Angermann moritz.angermann at gmail.com
Tue Nov 12 23:59:12 CST 2019


Hi,

I've been trying to figure out why we have some issues with wine executing
our cross compiled haskell programs when unicode is involved.  I've been able
to distill this to the attached C program. Compiled with gcc-7.4.0 like

  x86_64-pc-mingw32-gcc  main.c -o main-c.exe -finput-charset=UTF-8

this yields an executable[1] that when invoked via wine will produce:

```
CP_UTF8 = 65001
foo foo2 Hi there!
```

when run on windows 10 in a cmd shell

```
CP_UTF8 = 65001
foo 👋 bar

foo2 👋 bar
Hi there!
```

I've tried this with wine3 and wine4, but keep getting the same
results. It appears as if wine is somehow choking on the encoded
bytes.

Any hints as to what might be wrong?

Cheers,
 Moritz

---
[1]: https://www.dropbox.com/s/bc2fhtuv1u25i1w/main-c.exe?dl=0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: main.c
Type: application/octet-stream
Size: 287 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20191113/67f1f02e/attachment.obj>


More information about the wine-devel mailing list