Difference between revisions of "Unit Unicode"

From Ultibo.org
Jump to: navigation, search
Line 494: Line 494:
 
<pre style="border: 0; padding-bottom:0px;">function OemToCharBuffW(lpszSrc:LPCSTR; lpszDst:LPWSTR; cchDstLength:DWORD):BOOL;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function OemToCharBuffW(lpszSrc:LPCSTR; lpszDst:LPWSTR; cchDstLength:DWORD):BOOL;</pre>
 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' OEM to Unicode conversion (Char to WideChar)</div>
 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' OEM to Unicode conversion (Char to WideChar)</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| Currently only supports SBCS
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
 +
'''RTL unicode functions'''
 +
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function SysCodePageToWideChar(Ch:Char):WideChar;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' ANSI to Unicode conversion (Char to WideChar)</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| Currently only supports SBCS
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function SysWideCharToCodePage(Ch:WideChar):Char;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Unicode to ANSI conversion (WideChar to Char)</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"

Revision as of 05:26, 15 September 2016

Return to Unit Reference


Description


This unit implements the WideString and UnicodeString support for Ultibo including the WideStringManager/UnicodeStringManager interface for the RTL.

This unit provides compatible implementations of the following functions:

  • CharLower
  • CharPrev
  • CharUpper
  • FoldString
  • GetStringTypeEx
  • IsCharAlphaNumeric
  • IsDBCSLeadByte
  • LoadString
  • lstrcmpi
  • lstrlen
  • OemToCharBuff
  • wvsprintf
  • OemToAnsi
  • CharLowerBuff
  • CharToOem
  • CharUpperBuff
  • FormatMessage
  • GetStringTypeW
  • IsCharLower
  • IsTextUnicode
  • lstrcat
  • lstrcpy
  • MultiByteToWideChar
  • WideCharToMultiByte
  • CompareStringW
  • CharNext
  • CharToOemBuff
  • CompareStringA
  • GetStringTypeA
  • IsCharAlpha
  • IsCharUpper
  • LCMapString
  • lstrcmp
  • lstrcpyn
  • OemToChar
  • wsprintf
  • AnsiToOem

The following function are implemented by the FileSystem unit:

  • AreFileApisANSI (AreFileApisANSI is exposed in the Ultibo unit)
  • SetFileApisToANSI (SetFileApisToANSI is exposed in the Ultibo unit)
  • SetFileApisToOEM (SetFileApisToOEM is exposed in the Ultibo unit)

Most of the above are currently not implemented.

See also: https://msdn.microsoft.com/en-us/library/windows/desktop/dd319081%28v=vs.85%29.aspx

Constants


To be documented

Type definitions


To be documented

Public variables


To be documented

Function declarations



Initialization functions

[Expand]
procedure UnicodeInit;
Description: To be documented


Unicode functions

[Expand]
function MultiByteToWideChar(CodePage:UINT; dwFlags:DWORD; lpMultiByteStr:LPCSTR; cbMultiByte:Integer; lpWideCharStr:LPWSTR; cchWideChar:Integer):Integer;
Description: SBCS/DBCS OEM or ANSI string to Unicode string


[Expand]
function WideCharToMultiByte(CodePage:UINT; dwFlags:DWORD; lpWideCharStr:LPCWSTR; cchWideChar:Integer; lpMultiByteStr:LPSTR; cbMultiByte:Integer; lpDefaultChar:LPCSTR; lpUsedDefaultChar:LPBOOL):Integer;
Description: Unicode string to SBCS/DBCS OEM or ANSI string


[Expand]
function CompareString(Locale:LCID; dwCmpFlags:DWORD; lpString1:LPCSTR; cchCount1:Integer; lpString2:LPCSTR; cchCount2:Integer):Integer; inline;
Description: To be documented


[Expand]
function CompareStringA(Locale:LCID; dwCmpFlags:DWORD; lpString1:LPCSTR; cchCount1:Integer; lpString2:LPCSTR; cchCount2:Integer):Integer;
Description: ANSI compare of two strings for equivalence. If both strings are equal returns CSTR_EQUAL, if string 1 is less than string 2 returns CSTR_LESS_THAN and if string 1 is greater than string 2 returns CSTR_GREATER_THAN, on error returns 0


[Expand]
function CompareStringALowercase(lpString:PByte):Byte; inline;
Description: To be documented


[Expand]
function CompareStringW(Locale:LCID; dwCmpFlags:DWORD; lpString1:LPCWSTR; cchCount1:Integer; lpString2:LPCWSTR; cchCount2:Integer):Integer;
Description: Unicode compare of two strings for equivalence. If both strings are equal returns CSTR_EQUAL, if string 1 is less than string 2 returns CSTR_LESS_THAN and if string 1 is greater than string 2 returns CSTR_GREATER_THAN, on error returns 0


[Expand]
function CharUpper(lpsz:LPSTR):LPSTR; inline;
Description: To be documented


[Expand]
function CharUpperA(lpsz:LPSTR):LPSTR;
Description: Lower to Upper case conversion in ANSI code page (Char)


[Expand]
function CharUpperW(lpsz:LPWSTR):LPWSTR;
Description: Lower to Upper case conversion in Unicode (WideChar)


[Expand]
function CharUpperBuff(lpsz:LPSTR; cchLength:DWORD):DWORD; inline;
Description: To be documented


[Expand]
function CharUpperBuffA(lpsz:LPSTR; cchLength:DWORD):DWORD;
Description: Lower to Upper case conversion in ANSI code page (Char)


[Expand]
function CharUpperBuffW(lpsz:LPWSTR; cchLength:DWORD):DWORD;
Description: Lower to Upper case conversion in Unicode (WideChar)


[Expand]
function CharLower(lpsz:LPSTR):LPSTR; inline;
Description: To be documented


[Expand]
function CharLowerA(lpsz:LPSTR):LPSTR;
Description: Upper to Lower case conversion in ANSI code page (Char)


[Expand]
function CharLowerW(lpsz:LPWSTR):LPWSTR;
Description: Upper to Lower case conversion in Unicode (WideChar)


[Expand]
function CharLowerBuff(lpsz:LPSTR; cchLength:DWORD):DWORD; inline;
Description: To be documented


[Expand]
function CharLowerBuffA(lpsz:LPSTR; cchLength:DWORD):DWORD;
Description: Upper to Lower case conversion in ANSI code page (Char)


[Expand]
function CharLowerBuffW(lpsz:LPWSTR; cchLength:DWORD):DWORD;
Description: Upper to Lower case conversion in Unicode (WideChar)


[Expand]
function AnsiToOem(lpszSrc:LPCSTR; lpszDst:LPSTR):BOOL; inline;
Description: To be documented


[Expand]
function AnsiToOemBuff(lpszSrc:LPCSTR;lpszDst:LPSTR; cchDstLength:DWORD):BOOL; inline;
Description: To be documented


[Expand]
function OemToAnsi(lpszSrc:LPCSTR; lpszDst:LPSTR):BOOL; inline;
Description: To be documented


[Expand]
function OemToAnsiBuff(lpszSrc:LPCSTR; lpszDst:LPSTR; cchDstLength:DWORD):BOOL; inline;
Description: To be documented


[Expand]
function CharToOem(lpszSrc:LPCSTR; lpszDst:LPSTR):BOOL; inline;
Description: To be documented


[Expand]
function CharToOemA(lpszSrc:LPCSTR; lpszDst:LPSTR):BOOL;
Description: ANSI to OEM conversion (Char to Char)


[Expand]
function CharToOemW(lpszSrc:LPCWSTR; lpszDst:LPSTR):BOOL;
Description: Unicode to OEM conversion (WideChar to Char)


[Expand]
function OemToChar(lpszSrc:LPCSTR; lpszDst:LPSTR):BOOL; inline;
Description: To be documented


[Expand]
function OemToCharA(lpszSrc:LPCSTR; lpszDst:LPSTR):BOOL;
Description: OEM to ANSI conversion (Char to Char)


[Expand]
function OemToCharW(lpszSrc:LPCSTR; lpszDst:LPWSTR):BOOL;
Description: OEM to Unicode conversion (Char to WideChar)


[Expand]
function CharToOemBuff(lpszSrc:LPCSTR; lpszDst:LPSTR; cchDstLength:DWORD):BOOL; inline;
Description: To be documented


[Expand]
function CharToOemBuffA(lpszSrc:LPCSTR; lpszDst:LPSTR; cchDstLength:DWORD):BOOL;
Description: ANSI to OEM conversion (Char to Char)


[Expand]
function CharToOemBuffW(lpszSrc:LPCWSTR; lpszDst:LPSTR; cchDstLength:DWORD):BOOL;
Description: Unicode to OEM conversion (WideChar to Char)


[Expand]
function OemToCharBuff(lpszSrc:LPCSTR; lpszDst:LPSTR; cchDstLength:DWORD):BOOL; inline;
Description: To be documented


[Expand]
function OemToCharBuffA(lpszSrc:LPCSTR; lpszDst:LPSTR; cchDstLength:DWORD):BOOL;
Description: OEM to ANSI conversion (Char to Char)


[Expand]
function OemToCharBuffW(lpszSrc:LPCSTR; lpszDst:LPWSTR; cchDstLength:DWORD):BOOL;
Description: OEM to Unicode conversion (Char to WideChar)


RTL unicode functions

[Expand]
function SysCodePageToWideChar(Ch:Char):WideChar;
Description: ANSI to Unicode conversion (Char to WideChar)


[Expand]
function SysWideCharToCodePage(Ch:WideChar):Char;
Description: Unicode to ANSI conversion (WideChar to Char)



Return to Unit Reference