[Overview][Constants][Types][Procedures and functions][Index] |
Convert Unicode character or string to single-byte character or string.
Source position: charset.pp line 87
function getascii( |
c: tunicodechar; |
p: punicodemap |
):string; |
c: tunicodechar; |
p: punicodemap; |
ABuffer: PAnsiChar; |
ABufferLen: LongInt |
):LongInt; |
c |
|
Character to translate. |
p |
|
Mapping to use |
Translated character as string, or number of characters copied to buffer.
c |
|
Character to translate. |
p |
|
Mapping to use |
ABuffer |
|
Buffer to copy characters to. |
ABufferLen |
|
Length of buffer ABuffer |
getascii converts a Unicode character c to one or more single-byte characters according to the map in p. The result can be a string containing up to 2 characters, or the number of characters copied to the buffer ABuffer with length ABufferLen.
If the character cannot be translated, ASCII character 63 is returned (or copied to the buffer). In the case of the buffer variant of the function, -1 is then returned. If the buffer is not large enough, -1 is returned.
|
Map single-byte character to Unicode character. |