Internationalization and localization tools


Locale-Sensitive Windows C++ Function

LPSTR CharPrevExA(WORD CodePage, LPCSTR lpStart, LPCSTR lpCurrentChar, DWORD dwFlags);

Internationalization (I18n) Function Overview

The CharPrevExA function returns a pointer to the previous character in the string pointed to by lpCurrentChar, using the code page specified by CodePage. dwFlags is reserved and must be 0. If lpCurrentChar equals the lpStart argument, then CharPrevExA returns the first character in the string.

CodePage can be a specific identifier or one of the following predefined values:
CP_ACP - Use system default ANSI code page.
CP_MACCP - Use the system default Macintosh code page.
CP_OEMCP - Use system default OEM code page.
CP_THREAD_ACP - Use application's current thread code page.

There are no wide or generic versions of this function.

I18n Issues

Pass in a specific multibyte code page, or set CodePage to CP_THREAD_ACP to use the ANSI code page of the application's current thread. See Windows C++ Locale for information on setting up the locale and code page for an internationalized Windows application.

There are no wide or generic versions of this function. CharPrevExA should only be called in an MBCS application. For a Unicode UTF-16 application, call the Generic function CharPrev, or CharPrevW explicitly.

Recommended Replacements*

*If you're already using the recommended function, see I18n Issues for other reasons why Globalyzer is detecting the function.

Locale-Sensitive Windows C++ Functions

 

Lingoport internationalization and localization services and software