darkUnicode codec for Delphi
Another library to drop out of my Dark Glass development project today is my unicode codec (now named darkUnicode).
darkUnicode is now a part of the darkGlass repository: https://github.com/chapmanworld/DarkGlass
If you’re curious as to why, see here : https://www.youtube.com/watch?v=z9itk3uP2Yg&t=2s
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!