I am having an issue where on linux my characters like łąćźżó are not displayed correctly (like (TM)`~řÉ), but on windows they are, with the same code.
int main()
{
printf("łąć");
return 0;
}
this displays correctly when compiled on windows but not on linux, but I even added the utf-8 options and saved all files as UTF-8 encoding :(
Makefile flags only + link:
COMPILE_FLAGS = -std=c++0x -m32 -fPIC -c -finput-charset=UTF-8 -finput-charset=UTF-8 -fwide-exec-charset=UTF-8 -I ./ -w -D LINUX -D PROJECT_NAME=\"SampCaptcha\"
SampCaptcha = -D SampCaptcha $(COMPILE_FLAGS)
$(GPP) -m32 -lrt -ldl -fshort-wchar -shared -o $(SampCaptcha_OUTFILE) *.o
Why is this not working? the text is unreadable to users this way.
Alright, so people are asking for the 1:1 input/output, here you go:
Output on linux:
and this is the text:
Message("Witaj nowy graczu!");
Message("Wygląda na to iż Twoje ip nie jest nam znane");
Message("Za chwilkę zostaniesz przekierowany na serwer i będzies spokojnie mógł grać z innymi");
Message("Zanim to jednak zrobimy, pierwszę sprawdzimy czy nie jesteś komputerem który chce zepsuć serwer");
Message("Proszę się zrespawnować aby kontynuować");
And like I said, when compiled as a DLL it works on Windows, when inputting directly commands into the host program with unicode characters they are displayed on the chat. (it's a closed source application anyway to which I don't have access, but we are sure it's my GCC doing something wrong, many other people seem to have no problems with displaying special characters)
output of locale:
~# locale
LANG=en_GB.UTF-8
LANGUAGE=
LC_CTYPE="en_GB.UTF-8"
LC_NUMERIC="en_GB.UTF-8"
LC_TIME="en_GB.UTF-8"
LC_COLLATE="en_GB.UTF-8"
LC_MONETARY="en_GB.UTF-8"
LC_MESSAGES="en_GB.UTF-8"
LC_PAPER="en_GB.UTF-8"
LC_NAME="en_GB.UTF-8"
LC_ADDRESS="en_GB.UTF-8"
LC_TELEPHONE="en_GB.UTF-8"
LC_MEASUREMENT="en_GB.UTF-8"
LC_IDENTIFICATION="en_GB.UTF-8"
LC_ALL=