This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Unicode to 7-bit GSM | |
const write = 'Hello, Faisalman!'; | |
const msgSubmit = Array.from(write) | |
.map(char => Unicode2GSM[char].toString(16)) | |
.join(' '); | |
console.log(msgSubmit); // "48 65 6C 6C 6F 2C 20 46 61 69 73 61 6C 6D 61 6E 21" | |
// 7-bit GSM to Unicode | |
const read = "48 65 6C 6C 6F 2C 20 46 61 69 73 61 6C 6D 61 6E 21"; | |
const msgReceived = read.split(' ') |