Map single-byte character to Unicode character.
Source position: charset.pp line 82
function getunicode( |
c: AnsiChar; |
p: punicodemap |
):tunicodechar; |
AAnsiStr: PAnsiChar; |
AAnsiLen: LongInt; |
AMap: punicodemap; |
ADest: tunicodestring |
):LongInt; |
c |
|
Character to translate. |
p |
|
Single-byte to Unicode character map to use. |
Unicode character or number of Unicode characters in translated string.
AAnsiStr |
|
Ansi string to transform. |
AAnsiLen |
|
Length (in bytes) of ansi string to transform. |
AMap |
|
Single-byte to Unicode character map to use. |
ADest |
|
Buffer for translated Unicode string. |
The first form of getunicode will map a single character c to its Unicode equivalent for mapping p. If no equivalent can be found, 0 is returned.
The second form of getunicode will transform a string (specified using a pointer AAnsiStr to a buffer with length AAnsiLen) to a Unicode string using single byte codepage map AMap. It returns the number of Unicode characters. If ADest is Nil then just the number of characters is returned. If ADest is not nil, it must point to a buffer large enough to contain the Unicode string, and the converted string will be copied to it.
No checking on the validity of the buffers is done.
|
Convert Unicode character or string to single-byte character or string. |