Created
December 12, 2020 14:12
-
-
Save dmilith/5d0d19e46b1407b1460bfd7c7d00e8ac to your computer and use it in GitHub Desktop.
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 <stdio.h> | |
#include <stddef.h> | |
#include <wchar.h> | |
#include <locale.h> | |
int main () { | |
//const wchar_t* wc = L'๐'; | |
const char* wc = L"๐"; | |
int length = wcswidth(wc, 1); | |
setlocale(LC_ALL, "en_US.UTF-8"); | |
printf(L"%lc, length: %d\n", wc, length); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment