Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <locale.h>
- #include <stdio.h>
- #define __USE_XOPEN 1
- #include <wchar.h>
- int main(void)
- {
- setlocale(LC_CTYPE, "en_US.UTF-8");
- wchar_t wch = L'❤';
- printf("%lc %d\n", wch, wcwidth(wch));
- return 0;
- }
- /*
- output:
- ❤ 1
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement