Created
December 12, 2020 14:20
-
-
Save dmilith/9b5f61b873feb2b532b0ed5295a24b72 to your computer and use it in GitHub Desktop.
Revisions
-
dmilith created this gist
Dec 12, 2020 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ #include <stdio.h> #include <stddef.h> #include <wchar.h> #include <locale.h> int main () { setlocale(LC_ALL, "en_US.UTF-8"); const wchar_t* wc = L"👌"; int length = wcswidth(wc, 1); printf("%ls, length: %d\n", wc, length); }