FIX: _getmbp CRT Function Does Not Return Correct ValueLast reviewed: December 18, 1997Article ID: Q171543 |
The information in this article applies to:
SYMPTOMSThe C Run-time (CRT) Library function _getmbcp is supposed to return 0 if a single-byte code page is in use. However, this is not true with the CRT Library shipped with Visual C++ 5.0 in Visual Studio 97 Service Pack 1 and Service Pack 2. The function returns the current code page value irrespective of whether it is a single byte or multi byte code page. This behavior breaks existing programs that were using this call primarily to query whether a single-byte code page is active.
STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This bug has been fixed in Visual Studio 97 Service Pack 3. For more information, please see the following article in the Microsoft Knowledge Base:
ARTICLE-ID: Q170365 TITLE : INFO: Visual Studio 97 Service Packs - What, Where, and Why MORE INFORMATIONThe following sample program demonstrates the bug:
//sample.cpp /* Compiler options: none */ #include <mbctype.h> #include <stdio.h> main() { printf("The return value from _getmbcp is= %d \n", _getmbcp()); return 0; } Keywords : CRTIss VS97FixlistSP3 VS97FixlistSP2 VS97FixlistSP1 Version : WINNT:5.0sp1,5.0sp2,97,97sp1,97sp2 Platform : winnt Issue type : kbbug Solution Type : kbfix kbservicepack |
================================================================================
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |