I am currently querying a kdb system and it is returning the data in bytes. Specifically in one column, I am getting a byte object that looks likes this
b'US $ to UK \xa3 (TTF)'
If I want to decode the string version of this, I can do the following and this works:
result = 'US $ to UK \xa3 (TTF)'.encode().decode()
But I couldn't figure out a way to decode the byte object, any suggestions?
I've tried
b'US $ to UK \xa3 (TTF)'.decode()
but this gives an exception as the \xa3 is not encoded yet, is there a way to convert this byte object into a string literal without decoding?