For those who interested for code solution - here it is:
#include <stdio.h>
#include <stdlib.h> //contains system() function
void main()
{
char buffer[1024];
/*executing of command "stty iutf" in shell before input begins.
this command means "assume input characters are UTF-8 encoded".*/
if (system("stty iutf8") == -1) printf("system() error!\n");
for (;;) {
fgets(buffer, sizeof buffer-1, stdin);
printf("%s\n", buffer);
}
For those who interested for code solution - here it is:
#include <stdio.h>
#include <stdlib.h> //contains system() function
void main()
{
char buffer[1024];
/*executing of command "stty iutf" in shell before input begins.
this command means "assume input characters are UTF-8 encoded".*/
if (system("stty iutf8") == -1) printf("system() error!\n");
for (;;) {
fgets(buffer, sizeof buffer-1, stdin);
printf("%s\n", buffer);
}
}