ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

nls.c File Reference
#include <k32.h>
#include <debug.h>

Go to the source code of this file.

Defines

#define NDEBUG

Functions

GetNlsSectionName

Construct a name of NLS section.

Parameters:
CodePageCode page number.
BaseInteger base used for converting to string. Usually set to 10.
UnknownAs the name suggests the meaning of this parameter is unknown. The native version of Kernel32 passes it as the third parameter to NlsConvertIntegerToString function, which is used for the actual conversion of the code page number.
BaseNameBase name of the section. (ex. "\\Nls\\NlsSectionCP")
ResultBuffer that will hold the constructed name.
ResultSizeSize of the buffer for the result.
Returns:
TRUE if the buffer was large enough and was filled with the requested information, FALSE otherwise.
BOOL WINAPI GetNlsSectionName (UINT CodePage, UINT Base, ULONG Unknown, LPSTR BaseName, LPSTR Result, ULONG ResultSize)
GetCPFileNameFromRegistry

Get file name of code page definition file.

Parameters:
CodePageCode page number to get file name of.
FileNameBuffer that is filled with file name of successful return. Can be set to NULL.
FileNameSizeSize of the buffer to hold file name in WCHARs.
Returns:
TRUE if the file name was retrieved, FALSE otherwise.
BOOL WINAPI GetCPFileNameFromRegistry (UINT CodePage, LPWSTR FileName, ULONG FileNameSize)
NlsInit

Internal NLS related stuff initialization.

BOOL FASTCALL NlsInit (VOID)
NlsUninit

Internal NLS related stuff uninitialization.

VOID FASTCALL NlsUninit (VOID)
IntGetLoadedCodePageEntry

Internal function to get structure containing a code page information of code page that is already loaded.

Parameters:
CodePageNumber of the code page. Special values like CP_OEMCP, CP_ACP or CP_UTF8 aren't allowed.
Returns:
Code page entry or NULL if the specified code page hasn't been loaded yet.
PCODEPAGE_ENTRY FASTCALL IntGetLoadedCodePageEntry (UINT CodePage)
IntGetCodePageEntry

Internal function to get structure containing a code page information.

Parameters:
CodePageNumber of the code page. Special values like CP_OEMCP, CP_ACP or CP_THREAD_ACP are allowed, but CP_UTF[7/8] isn't.
Returns:
Code page entry.
PCODEPAGE_ENTRY FASTCALL IntGetCodePageEntry (UINT CodePage)
IntMultiByteToWideCharUTF8

Internal version of MultiByteToWideChar for UTF8.

See also:
MultiByteToWideChar
Todo:
Add UTF8 validity checks.
static INT WINAPI IntMultiByteToWideCharUTF8 (DWORD Flags, LPCSTR MultiByteString, INT MultiByteCount, LPWSTR WideCharString, INT WideCharCount)
IntMultiByteToWideCharCP

Internal version of MultiByteToWideChar for code page tables.

See also:
MultiByteToWideChar
Todo:
Handle MB_PRECOMPOSED, MB_COMPOSITE, MB_USEGLYPHCHARS and DBCS codepages.
static INT WINAPI IntMultiByteToWideCharCP (UINT CodePage, DWORD Flags, LPCSTR MultiByteString, INT MultiByteCount, LPWSTR WideCharString, INT WideCharCount)
IntMultiByteToWideCharSYMBOL

Internal version of MultiByteToWideChar for SYMBOL.

See also:
MultiByteToWideChar
static INT WINAPI IntMultiByteToWideCharSYMBOL (DWORD Flags, LPCSTR MultiByteString, INT MultiByteCount, LPWSTR WideCharString, INT WideCharCount)
IntWideCharToMultiByteSYMBOL

Internal version of WideCharToMultiByte for SYMBOL.

See also:
WideCharToMultiByte
static INT WINAPI IntWideCharToMultiByteSYMBOL (DWORD Flags, LPCWSTR WideCharString, INT WideCharCount, LPSTR MultiByteString, INT MultiByteCount)
IntWideCharToMultiByteUTF8

Internal version of WideCharToMultiByte for UTF8.

See also:
WideCharToMultiByte
static INT WINAPI IntWideCharToMultiByteUTF8 (UINT CodePage, DWORD Flags, LPCWSTR WideCharString, INT WideCharCount, LPSTR MultiByteString, INT MultiByteCount, LPCSTR DefaultChar, LPBOOL UsedDefaultChar)
IsValidSBCSMapping

Checks if ch (single-byte character) is a valid mapping for wch

See also:
IntWideCharToMultiByteCP
static BOOL IntIsValidSBCSMapping (PCPTABLEINFO CodePageTable, DWORD Flags, WCHAR wch, UCHAR ch)
IsValidDBCSMapping

Checks if ch (double-byte character) is a valid mapping for wch

See also:
IntWideCharToMultiByteCP
static BOOL IntIsValidDBCSMapping (PCPTABLEINFO CodePageTable, DWORD Flags, WCHAR wch, USHORT ch)
IntWideCharToMultiByteCP

Internal version of WideCharToMultiByte for code page tables.

See also:
WideCharToMultiByte
Todo:
Handle WC_COMPOSITECHECK
static INT WINAPI IntWideCharToMultiByteCP (UINT CodePage, DWORD Flags, LPCWSTR WideCharString, INT WideCharCount, LPSTR MultiByteString, INT MultiByteCount, LPCSTR DefaultChar, LPBOOL UsedDefaultChar)
IntIsLeadByte

Internal function to detect if byte is lead byte in specific character table.

static BOOL WINAPI IntIsLeadByte (PCPTABLEINFO TableInfo, BYTE Byte)
WideCharToMultiByte

Convert a wide-charater string to closest multi-byte equivalent.

Parameters:
CodePageCode page to be used to perform the conversion. It can be also one of the special values (CP_ACP for ANSI code page, CP_MACCP for Macintosh code page, CP_OEMCP for OEM code page, CP_THREAD_ACP for thread active code page, CP_UTF7 or CP_UTF8).
FlagsAdditional conversion flags (WC_NO_BEST_FIT_CHARS, WC_COMPOSITECHECK, WC_DISCARDNS, WC_SEPCHARS, WC_DEFAULTCHAR).
WideCharStringPoints to the wide-character string to be converted.
WideCharCountSize in WCHARs of WideCharStr, or 0 if the caller just wants to know how large WideCharString should be for a successful conversion.
MultiByteStringPoints to the buffer to receive the translated string.
MultiByteCountSpecifies the size in bytes of the buffer pointed to by the MultiByteString parameter. If this value is zero, the function returns the number of bytes required for the buffer.
DefaultCharPoints to the character used if a wide character cannot be represented in the specified code page. If this parameter is NULL, a system default value is used.
UsedDefaultCharPoints to a flag that indicates whether a default character was used. This parameter can be NULL.
Returns:
Zero on error, otherwise the number of bytes written in the MultiByteString buffer. Or the number of bytes needed for the MultiByteString buffer if MultiByteCount is zero.
INT WINAPI WideCharToMultiByte (UINT CodePage, DWORD Flags, LPCWSTR WideCharString, INT WideCharCount, LPSTR MultiByteString, INT MultiByteCount, LPCSTR DefaultChar, LPBOOL UsedDefaultChar)
GetACP

Get active ANSI code page number.

UINT WINAPI GetACP (VOID)
GetOEMCP

Get active OEM code page number.

UINT WINAPI GetOEMCP (VOID)
IsDBCSLeadByteEx

Determine if passed byte is lead byte in current ANSI code page.

BOOL WINAPI IsDBCSLeadByteEx (UINT CodePage, BYTE TestByte)
BOOL WINAPI IsDBCSLeadByte (BYTE TestByte)
NTSTATUS WINAPI CreateNlsSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, ULONG Size, ULONG AccessMask)
BOOL WINAPI IsValidUILanguage (LANGID langid)
VOID WINAPI NlsConvertIntegerToString (ULONG Value, ULONG Base, ULONG strsize, LPWSTR str, ULONG strsize2)
UINT WINAPI SetCPGlobal (UINT CodePage)
BOOL WINAPI ValidateLCType (int a1, unsigned int a2, int a3, int a4)
BOOL WINAPI NlsResetProcessLocale (VOID)
VOID WINAPI GetDefaultSortkeySize (LPVOID lpUnknown)
VOID WINAPI GetLinguistLangSize (LPVOID lpUnknown)
BOOL WINAPI ValidateLocale (IN ULONG LocaleId)
ULONG WINAPI NlsGetCacheUpdateCount (VOID)
BOOL WINAPI IsNLSDefinedString (IN NLS_FUNCTION Function, IN DWORD dwFlags, IN LPNLSVERSIONINFO lpVersionInformation, IN LPCWSTR lpString, IN INT cchStr)
BOOL WINAPI GetNLSVersion (IN NLS_FUNCTION Function, IN LCID Locale, IN OUT LPNLSVERSIONINFO lpVersionInformation)

Variables

static const char UTF8Length [128]
static const unsigned char UTF8Mask [6] = {0x7f, 0x1f, 0x0f, 0x07, 0x03, 0x01}
static LIST_ENTRY CodePageListHead
static CODEPAGE_ENTRY AnsiCodePage
static CODEPAGE_ENTRY OemCodePage
static RTL_CRITICAL_SECTION CodePageListLock

IsValidCodePage

Detect if specified code page is valid and present in the system.

Parameters:
CodePageCode page number to query.
Returns:
TRUE if code page is present.
static const signed char base64inv []
BOOL WINAPI IsValidCodePage (UINT CodePage)
static VOID Utf7Base64Decode (BYTE *pbDest, LPCSTR pszSrc, INT cchSrc)
static VOID myswab (LPVOID pv, INT cw)
static INT Utf7ToWideCharSize (LPCSTR pszUtf7, INT cchUtf7)
static INT Utf7ToWideChar (LPCSTR pszUtf7, INT cchUtf7, LPWSTR pszWide, INT cchWide)

MultiByteToWideChar

Convert a multi-byte string to wide-charater equivalent.

Parameters:
CodePageCode page to be used to perform the conversion. It can be also one of the special values (CP_ACP for ANSI code page, CP_MACCP for Macintosh code page, CP_OEMCP for OEM code page, CP_THREAD_ACP for thread active code page, CP_UTF7 or CP_UTF8).
FlagsAdditional conversion flags (MB_PRECOMPOSED, MB_COMPOSITE, MB_ERR_INVALID_CHARS, MB_USEGLYPHCHARS).
MultiByteStringInput buffer.
MultiByteCountSize of MultiByteString, or -1 if MultiByteString is NULL terminated.
WideCharStringOutput buffer.
WideCharCountSize in WCHARs of WideCharString, or 0 if the caller just wants to know how large WideCharString should be for a successful conversion.
Returns:
Zero on error, otherwise the number of WCHARs written in the WideCharString buffer.
static const char mustshift []
static const char base64 [] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
INT WINAPI MultiByteToWideChar (UINT CodePage, DWORD Flags, LPCSTR MultiByteString, INT MultiByteCount, LPWSTR WideCharString, INT WideCharCount)
static INT WideCharToUtf7Size (LPCWSTR pszWide, INT cchWide)
static INT WideCharToUtf7 (LPCWSTR pszWide, INT cchWide, LPSTR pszUtf7, INT cchUtf7)
static BOOL GetLocalisedText (DWORD dwResId, WCHAR *lpszDest)
BOOL WINAPI GetCPInfo (UINT CodePage, LPCPINFO CodePageInfo)
BOOL WINAPI GetCPInfoExW (UINT CodePage, DWORD dwFlags, LPCPINFOEXW lpCPInfoEx)
BOOL WINAPI GetCPInfoExA (UINT CodePage, DWORD dwFlags, LPCPINFOEXA lpCPInfoEx)

Generated on Fri May 25 2012 05:10:16 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.