Text Encoding library

The first version of Text Encoding library has been released.
It contains JavaScript utility functions for encoding and decoding binary data and text:

  • converting between stream and Base64, Base64Url, Base32, Hexadecimal text formats
  • encoding and decoding using a specified character set (e.g. UTF-8, ASCII, ISO-8859-1)
  • escaping of text so it can be safely included in URL, HTML or XML

Source code and documentation can be found here: https://github.com/enonic/lib-text-encoding

See also Text Encoding lib in Enonic Market

6 Likes

Thanks Alex. This will be helpful.

I previously added some code to the util lib for generating MD5, SHA-1 and SHA-256 hashes from strings and files. It hasn’t been merged yet. Maybe those things could be added to this encoding lib instead just to have it all in one place.

1 Like

Good idea. Can you make a pull request with the hash functions for the text-encoding project?