RAD Studio 10.4.1 is now available! Learn more. Looking for discounts? Visit our Special Offers page!
News

darkUnicode codec for Delphi

Author: Craig Chapman

Another library to drop out of my Dark Glass development project today is my unicode codec (now named darkUnicode).
https://github.com/chapmanworld/darkUnicode

This simple class can be used to encode and decode unicode code-points by hand (independent of RTL functions to do the same), and I’ve used it previously to create my own unicode text buffer and stream support.  It can also  be used to determine the unicode format of a text file, by calling the DecodeBOM() method in the appropriate order.

Tip: Depending on Little / Big Endian, the BOM for UTF-32 formats may match BOM for a UTF-16 format when only considering the first 16-bits, so test for 32-bit BOM first.

I hope someone finds this library useful.

Thanks for Reading!


Reduce development time and get to market faster with RAD Studio, Delphi, or C++Builder.
Design. Code. Compile. Deploy.
Start Free Trial   Upgrade Today

   Free Delphi Community Edition   Free C++Builder Community Edition

Deep Dive Webinar: Boost C++Builder Compile Speed with TwineCompile
Related posts
C++

Articles and News from the C++ community

News

Building REST services with RAD Server (Delphi & C++ Builder)

News

A vulkan header generator for Delphi.

C++

Learn to Program with Community Edition

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

IN THE ARTICLES