c - Linux Code::Blocks cc1: error: failure to convert cp1253 to UTF-8 Trying to display greek in terminal -


i have following program. comprised of both greek , english text.

#include <stdio.h>  int main() {     printf("Για κάθε φυσικό αριθμό n, υπάρχει ακριβώς ένας φυσικός αριθμός k\n\ n=floor(k*φ) ή n = floor(k*φ^2)\n");      return 0; } 

i have these compiler options:

-std=c99 -finput-charset=cp1253 -fexec-charset=cp737 

how can display greek on terminal window? if not code::blocks, plain gcc. thanks.

oh ok searching hour or more, no answer. found out (instead of searching decided think). have use following compiler options instead.

-finput-charset=cp737 -fexec-charset=cp737 

i leave here in case else wants this, because found no answer online. i'm not sure why works, thought character encodings should match. cp737 code page 737 used greek language. works in both linux , windows, displaying both english , greek perfectly.

update

no apparently not work in windows 8.1 64, latest mingw gcc environment. prints garbage. solution above valid unix / linux systems.


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -