TEncoding = class

TMBCSEncoding = class(TEncoding)

TUTF7Encoding = class(TMBCSEncoding) TUTF8Encoding = class(TUTF7Encoding) TUnicodeEncoding = class(TEncoding)

TBigEndianUnicodeEncoding = class(TUnicodeEncoding)

The TUnicodeEncoding class uses the same UTF-16 LE (Little Endian) format used by the UnicodeString type. One object of each of these classes is available within the TEncoding class, as class data, and has a corresponding getter function and class property: type

TEncoding = class pubiic class property ASCII: TEncoding read GetASCll; class property BigEndianUnicode: TEncoding read GetBigEndianUnicode; class property Default: TEncoding read GetDefault; class property Unicode: TEncoding read GetUnicode; class property UTF7: TEncoding read GetUTF7; class property UTF8: TEncoding read GetUTF8;

The TEncoding class has methods for reading and writing characters to byte streams, to perform conversions, plus a special function to handle the BOM called GetPreamble. So you can write (anywhere in the code): I TEncoding.UTF8.GetPreamb1e

Was this article helpful?

0 0
Project Management Made Easy

Project Management Made Easy

What you need to know about… Project Management Made Easy! Project management consists of more than just a large building project and can encompass small projects as well. No matter what the size of your project, you need to have some sort of project management. How you manage your project has everything to do with its outcome.

Get My Free Ebook

Post a comment