bin-hex-utf8-converter - In development
A simple convertert for hexadecimal, UTF8 and binary. The package is not finished yet, now there are only the Hexadedimal to UTF8 and the Hexadecimal to Binary converters.
How to use it
Import and use the method you need. For example hexToUTF8.
hexToUTF8 takes an input parameter that is the whole hexadecimal input. It will treat every non-spaced token as an unique value. It will generate the output as an array of objects for every token with the result and the boolean 'isError'
Example one hexadecimal value to UTF8
Input = "41"
Output = [{
'value' : 'A',
'isError: false
}]
Example more hexadecimal values to UTF8 and a non-valid hexadecimal
Input = "41 42 T"
Output =[{
'value' : 'A',
'isError': false
},{
'value' : 'B',
'isError': false
},{
'value' : 'Invalid Hexadecimal. Alphanumeric digit must beetween 0 and 9 and/or A and F',
'isError': true
}]
Other example
Input = "4142"
Output = [{
'value' : '䅂',
'isError': false
}]
Other example
Input = "41 20 42"
Output =[{
'value' : 'A',
'isError': false
},{
'value' : ' ',
'isError': false
},{
'value' : 'B',
'isError': true
}]