Microsoft KB Archive/169484

From BetaArchive Wiki
< Microsoft KB Archive
Revision as of 16:34, 18 July 2020 by 3155ffGd (talk | contribs) (importing KB archive)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Knowledge Base


FIX: CString::MakeUpper and MakeLower Don't Work with Extended Characters

Article ID: 169484

Article Last Modified on 11/21/2006



APPLIES TO

  • Microsoft Foundation Class Library 4.2, when used with:
    • Microsoft Visual C++ 5.0 Enterprise Edition
    • Microsoft Visual C++ 5.0 Professional Edition
    • Microsoft Visual Studio 97 Service Pack 3



This article was previously published under Q169484

SYMPTOMS

MakeUpper() and MakeLower() in Visual C++ 5.0 do not convert the extended characters, such as ,,.

CAUSE

MakeUpper() and MakeLower() were working correctly with the extended characters in Visual C++ 4.0, but not in Visual C++ 5.0. In Visual C++ 4.0, CString::MakeUpper() and MakeLower() functions are wrappers for the SDK functions CharUpper() and CharLower(). They work correctly for the extended characters, such as [ASCII 197],[ASCII 196],[ASCII 214]. In Visual C++ 5.0, the MakeUpper() and MakeLower() functions use the C Runtime _tcslwr and _tcsupr to convert the characters, instead of CharUpper and CharLower. As a result, the extended characters are not being converted anymore.

RESOLUTION

This problem can be avoided by using the SDK APIs CharUpper() and CharLower() instead of the CString functions.

STATUS

This problem has been corrected in Visual Studio 97 Service Pack 1.

For additional information about the Visual Studio 97 Service Pack 1, please see the following article in the Microsoft Knowledge Base:

170365 INFO: Visual Studio 97 Service Packs - What, Where, and Why


Keywords: kbbug kbfix kbnoupdate kbvc500sp1fix KB169484