08-17-2023 09:55 AM - edited 08-17-2023 09:58 AM
Hello Reader,
I am converting data from one system to another and that needs conversion of string read from a file. The raw file is in hex format with some spaces. This hex will be converted to a normal readable string.
EDIT
I am getting the desired result but was wondering if there is a better/ direct way to get the same result.
Note: String constant is showing a section of entire text read, "desired result" is correct.
Thanking you,
X
Solved! Go to Solution.
08-17-2023 10:05 AM
Could you please provide an example of input and output?
Is your input string in binary display format?
08-17-2023 10:19 AM - edited 08-17-2023 10:20 AM
Hi Santosh,
Previously attached snippet has both input (string constant) and output (Desired Result). No, input string is displayed in normal format.
EDIT
File is in .txt format and below is how I am reading it:
A different section copied from the text file (Just to show how it looks in a notepad) :
00 00 00 51 02 f0 00 42 15 d0 2f 72 c1 08 00 de
02 f0 00 42 15 d0 2f 8e 8b bc 0b d2 02 f0 00 42
15 d0 2f aa b7 72 17 60 02 f0 00 42 15 d0 2f c6
8a 91 32 78 02 f0 00 42 15 d0 2f e2 44 f9 bf 96
02 f0 00 42 15 d0 30 8a 0c 31 7c 40 02 f0 00 42
Please do not use this for conversion as result will not make much sense.
08-17-2023 10:30 AM
May be something like that will be shorter:
Using Spreadsheet String to Array and Space as delimeter. You have to remove double spaces first to avoid zeroes.
08-17-2023 10:41 AM - edited 08-17-2023 10:57 AM
HI Andrey_Dmitriev,
Yes, this is better! Thank you for the suggestion.
I will be stunned if it can be any shorter. 😄
EDIT: This actually corrected one mistake that I was making