INFO: SetConsoleOutputCP Only Effective with Unicode Fonts

Last reviewed: April 10, 1997
Article ID: Q99795
The information in this article applies to:
  • Microsoft Win32 Application Programming Interface (API) included with: - Microsoft Windows NT versions 3.51, 4.0

SUMMARY

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."

MORE INFORMATION

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 3.51 and 4.0, 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 Software Development Kit (SDK) also ships with a Sample called CONSOLE in the \MSTOOLS\SAMPLES\WIN32 directory that demonstrates the use of SetConsoleOutputCP() API.


Additional query words: winnt codepage
Keywords : BseCon kbprg
Version : 3.51 4.0
Platform : NT WINDOWS
Issue type : kbinfo


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: April 10, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.