It looks as though it is the Hex equivalent
~ = 7E
+ = 2B
@ = 40
- = 2D
= = 3D
" = 22
' = 27
( = 28
) = 29
_ = 5F
space = 20
You should be able to use to charCodeAt
to encode these values
'~'.charCodeAt(0).toString(16).toUpperCase()
// -> returns '7E'
Edit
• ASCII codes are here: http://www.ascii.cl/htmlcodes.htm
• string(16) means base 16, which is hexadecimal