3 ms·
The article mentions that hex encoding solves most of the problems but isn't very space efficient. A good alternative may be base64k encoding, which was propose
by matt_wulfeck 11y ago
The article mentions that hex encoding solves most of the problems but isn't very space efficient. A good alternative may be base64k encoding, which was proposed here on hacker news[0].
This gives you safe strings as well as space-efficient encoding. As a bonus virtually all systems support unicode without any tweaking necessary.
I hope the author of base64k gets around to writing an RFC because it would be a great standard to use.
[0] https://www.npmjs.com/package/base65536 https://www.npmjs.com/package/base65536