Gcc, WinAPI and 1250

123 views Asked by At

Im from Poland, It is easy to me to write

char* text = "Wół się cięć że goń ów stan"l

with polish chars (in ascii strings) - I checked and it is encoded as Windows-1250 code page. When i use those strigs in winapi (like in SetTitle function) it works okay.. Seems thet winapi and gcc treats it all right..

One thing i am not sure is if this way produced winapi app will work okay when distributed on all windows systems around the world..

Does maybe some acknowledge or deny it (and provide more information)?

tnx

1

There are 1 answers

0
Oleg Korzhukov On

This text will NOT be displayed correct on most Windows machines all around the world. Default encoding for US is Windows-1252.

Windows has a "language for non-Unicode applications" (see screenshot), which defines encoding for applications like yours. In my case it will be Windows-1251 and characters specific to Polish alphabet will be changed with Cyrillic letters and text will be completely unreadable.

Windows 10 screenshot