Problem with '€' (EURO) symbol in (U)CRT |printf("%S", ...);| ...
Roland Mainz
roland.mainz@nrubsig.org
Wed Nov 27 00:08:21 GMT 2024
Hi!
----
Cygwin 3.5.4/Win10/64bit, the following program prints a '?' where I
would expect a '€' (EURO) symbol:
---- snip ----
printf '#include <stdio.h>\n#include <wchar.h>\n#include
<io.h>\n#include <fcntl.h>\n#include <locale.h>\nint main(int ac, char
*av[]) { setlocale(LC_ALL, ""); printf("%%S\\n", L"hello € world");
return 0; }\n' >x.c && clang -target x86_64-pc-windows-gnu -Wall x.c
-o x.exe && ./x.exe
hello ? world
---- snip ----
My hope was that - because Win32 uses UTF-16 for |wchar_t| - that the
EURO symbol can be displayed on any locale/code page which supports
the EURO symbol, but somehow I always get a '?'.
Does anyone know what I am doing wrong ?
----
Bye,
Roland
--
__ . . __
(o.\ \/ /.o) roland.mainz@nrubsig.org
\__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer
/O /==\ O\ TEL +49 641 3992797
(;O/ \/ \O;)
More information about the Cygwin
mailing list