RAD Studio VCL Reference
TReader.ReadWideChar Method

Reads a wide character from the reader object's stream and returns that character value.

function ReadWideChar: WideChar;
__fastcall WideChar ReadWideChar();

ReadWideChar is a helper method used by other reader methods to read a tagged wide character value at the current reader Position. ReadWideChar invokes the ReadWideString, and return that string if it is 1 character long. Otherwise, an exception is thrown.

Note: If the tagged data is a widestring with length = 1, it is widechar compatible. If length > 1, it is an error, however, the rest of the string data must be read to keep the reader in a consistent state. Each action that processes tagged data must leave the reader Position at the start of the next unread tag.


Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!