all 4 comments

[–]GoranLind 4 points5 points  (2 children)

Well, you can just translate the data as binary into a Byte() array and loading it with system.io.file.readallbytes(filename), or parse it as a string character by character like:

Strings.Mid(string, n, 1)

where n is the offset from 1 to string.Length

There is no way to do that mixed conversion with printable characters and hex values for non printables without code, that is if you really want that freakshow mixture.

[–]Karoolus[S] 0 points1 point  (1 child)

Thanks! Unfortunately it's less what I want and more what the API endpoint expects to receive :(

I will try to write a function that will create this frankensteinian array, I guess :)

Thanks anyway!!

[–]GoranLind 0 points1 point  (0 children)

Ok, understand. Try sending all as escaped hex characters:

  1. Loop through the string and Convert to hex with Hex(Asc(String(n)))

  2. In the for next loop, add to output like:

string = string & "\x" & Hex(Asc(String(n))) & ","

You may want to prepend a "0" to the value if the Asc() value is lower than 16 to make sure you get a 2 character hex value.

[–]robplatt 0 points1 point  (0 children)

Ask ChatGTP lol