WinUpperChar
Appearance
This function translates a character to uppercase.
Syntax
WinUpperChar(hab, ulCodepage, ulCountry, ulInchar)
Parameters
- hab (HAB) - Input
- Anchor-block handle.
- ulCodepage (ULONG) - Input
- Code page.
- 0
- Use the current-process code page.
- Other
- Use the specified code page.
- ulCountry (ULONG) - Input
- Country code.
- 0
- Use the default country code specified in CONFIG.SYS.
- Other
- Use the specified country code.
- ulInchar (ULONG) - Input
- Character to be translated to uppercase.
Returns
- ulOutchar (ULONG) - returns
- Translated character.
- 0
- Error occurred.
- Other
- The translated character.
Remarks
The case-mapping used is the same as provided by the OS/2 DosCaseMap call.
Errors
Possible returns from WinGetLastError:
- PMERR_INV_CODEPAGE (0x2052) - An invalid code-page was specified.
- PMERR_INVALID_STRING_PARM (0x100B) - The specified string parameter is invalid.
Example Code
This example shows how the WinUpperChar call can be used to convert a characters in NLS languages to uppercase.
#define INCL_WINCOUNTRY #include <OS2.H> #include <stdio.h> main() { HAB hab; char szString[] = "ä"; hab = WinInitialize(0); WinUpper(hab, 850, 49, szString); WinTerminate(hab); }