Unicode Output Format Specifiers

From RAD Studio
Jump to: navigation, search

Go Up to printf, wprintf

The following table shows the formatted output specifiers for the Unicode family of functions.

The table shows how the format specifier is used by printf and the Unicode family of output functions to output strings and characters:

  • For the character format specifiers (%c, %C, %hc, %hC, %lc, %lC) narrow and wide refer to the type of characters char, respectively wchar_t.
  • For the string format specifiers (%s, %S, %hs, %hS, %ls, %lS) narrow and wide refer to the type of character strings char*, respectively wchar_t*.
Format Specifier   printf 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.

See Also