INFO: SetConsoleOutputCP Only Effective with Unicode Fonts

Article translations Article translations
Article ID: 99795 - View products that this article applies to.
This article was previously published under Q99795
This article has been archived. It is offered "as is" and will no longer be updated.
Expand all | Collapse all


SetConsoleOutputCP() changes the displaying of extended characters in a console window only if the current font is a fixed-pitch Unicode font. It does not effect the displaying of extended characters of the console font named "Raster Font."


SetConsoleOutputCP() is designed to change the mapping of the 256 8-bit character values into the glyph set of a fixed-pitch Unicode font, rather than loading a separate, non-Unicode font for each call to SetConsoleOutputCP(). For Windows NT, Windows 2000, and Windows XP the currently available Unicode console font is the Lucida Console TrueType font.

To demonstrate SetConsoleOutputCP(), implement a console application that calls this API. After a successful return from this function, call printf to display characters of ASCII value greater than 127.

The Win32 Platform SDK also ships with a Sample called CONSOLE in the \samples\WinUI\Console\Console directory that demonstrates the use of the SetConsoleOutputCP() API.


Article ID: 99795 - Last Review: February 28, 2014 - Revision: 3.1
  • Microsoft Win32 Application Programming Interface, when used with:
    • Microsoft Windows NT 3.51 Service Pack 5
    • Microsoft Windows NT 4.0
    • Microsoft Windows 2000 Standard Edition
    • the operating system: Microsoft Windows XP
kbnosurvey kbarchive kbinfo kbapi kbconsole kbprogramming kbkernbase KB99795

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from