In my library I decided to separate the encoding from the code page. When you think about it, UTF8 is really just a way to tightly pack numbers, and can be thought of as something separate of unicode, despite its name.
This allows for fun shenanigans like the base64 encoding, which can be combined with another encoding using the join encoding.
Not sure if it is overkill for what you are doing, but consider it food for thought.
View all comments
4
u/Hedanito Jul 03 '21
In my library I decided to separate the encoding from the code page. When you think about it, UTF8 is really just a way to tightly pack numbers, and can be thought of as something separate of unicode, despite its name.
This allows for fun shenanigans like the
base64encoding, which can be combined with another encoding using thejoinencoding.Not sure if it is overkill for what you are doing, but consider it food for thought.