Created
February 21, 2024 15:54
-
-
Save iglesias/5818e7f41ae1b8ea9e5d9ae9c8dfa5ab to your computer and use it in GitHub Desktop.
unicode.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include<stdlib.h> | |
| #include<stdio.h> | |
| int | |
| main () | |
| { | |
| int i; | |
| char *str = getenv ("LANG"); | |
| for (i = 0; str[i + 2] != 00; i++) | |
| { | |
| if ((str[i] == 'u' && str[i + 1] == 't' && str[i + 2] == 'f') | |
| || (str[i] == 'U' && str[i + 1] == 'T' && str[i + 2] == 'F')) | |
| { | |
| printf | |
| ("Unicode is supported on this terminal and U+25B3 is : \u25b3\n"); | |
| i = -1; | |
| break; | |
| } | |
| } | |
| if (i != -1) | |
| printf ("Unicode is not supported on this terminal."); | |
| return 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment