Skip to content

Latest commit

 

History

History
12 lines (10 loc) · 521 Bytes

README.md

File metadata and controls

12 lines (10 loc) · 521 Bytes

Using the library (unicode.js):

// The many forms of € (unicode character point '20ac')

// hex to int 
unicodeConvert('20ac', datatypesEnum.HEX, datatypesEnum.INT) === '8364';
// int to utf8
unicodeConvert('8364', datatypesEnum.INT, datatypesEnum.UTF8) === '111000101000001010101100';
// utf8 to binary
unicodeConvert('111000101000001010101100', datatypesEnum.UTF8, datatypesEnum.BIN) === '10000010101100';
// binary to hex
unicodeConvert('10000010101100;, datatypesEnum.BIN, datatypesEnum.HEX) === '20ac';