Project

symbolify

0.01
Low commit activity in last 3 years
No release in over a year
Safely print all code points from Unicode or single-byte encodings
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 0.8, < 2.0
 Project Readme

Symbolify [version] [ci]

Safely print all codepoints from Unicode and single-byte encodings in UTF-8. It replaces control and non-printable characters with readable equivalents and wraps most blank characters in ] and [.

Programs that make use of this library: unibits, uniscribe

Setup

Add to your Gemfile:

gem 'symbolify'

Usage

puts Symbolify.symbolify "A"   # A
puts Symbolify.symbolify "🌫"   # 🌫
puts Symbolify.symbolify "\0"   # ␀
puts Symbolify.symbolify "\n"   # ␊
puts Symbolify.symbolify "\x7F"   # ␡
puts Symbolify.symbolify "\u{84}"   # IND
puts Symbolify.symbolify "\u{200F}"   # RLM
puts Symbolify.symbolify "\u{2067}"   # RLI
puts Symbolify.symbolify "\u{0300}"   # ◌̀
puts Symbolify.symbolify " "   # ] [
puts Symbolify.symbolify "\u{FFF9}"   # IAA
puts Symbolify.symbolify "\u{FFFC}"   # OBJ
puts Symbolify.symbolify "\u{E0020}"   # TAG ␠
puts Symbolify.symbolify "\u{E01D7}"   # VS232
puts Symbolify.symbolify "\u{D0000}"   # n/a
puts Symbolify.symbolify "\u{E0000}"   # n/a*
puts Symbolify.symbolify "\u{10FFFF}"   # n/c
puts Symbolify.symbolify "\x80"   # �

MIT License

Copyright (C) 2017-2022 Jan Lelis https://janlelis.com. Released under the MIT license.