Unicode Input Format Specifiers
Go Up to scanf, wscanf
The following table shows the formatted output specifiers for the Unicode family of functions. The table shows how the format specifier is used by scanf and the Unicode family of input functions to input strings and characters.
Format Specifier | scanf function | Unicode function |
---|---|---|
%c |
narrow |
wide |
%C |
wide |
narrow |
%hc |
narrow |
narrow |
%hC |
narrow |
narrow |
%lc |
wide |
wide |
%lC |
wide |
wide |
%s |
narrow |
wide |
%S |
wide |
narrow |
%hs |
narrow |
narrow |
%hS |
narrow |
narrow |
%ls |
wide |
wide |
%lS |
wide |
wide |
Note: On the macOS platform, the %ls format specifier is not supported for Unicode string data.