Forum > General

how to convert BitConverter.GetBytes for lazarus

<< < (2/4) > >>

bobc:

--- Quote ---when i read my data i see  carecter. how i can return it normal carecter?
how can i convert  binary to ASCII (string) ?
--- End quote ---

There is not really enough detail in that question for me to answer. The "box" character is the standard Unicode symbol meaning that the requested character code has no representation in the current font. I don't know what you are trying to display, where or how.

Usually you can just cast a byte to a char to display ASCII, but if you are using Unicode it all gets more tricky.

ahmetnurideniz:

--- Quote from: bobc on August 26, 2010, 01:08:53 pm ---
--- Quote ---when i read my data i see  carecter. how i can return it normal carecter?
how can i convert  binary to ASCII (string) ?
--- End quote ---

There is not really enough detail in that question for me to answer. The "box" character is the standard Unicode symbol meaning that the requested character code has no representation in the current font. I don't know what you are trying to display, where or how.

Usually you can just cast a byte to a char to display ASCII, but if you are using Unicode it all gets more tricky.

--- End quote ---
The deveice send me this data "\001\r\n\" i see it from wireshark. it send me binnary data. i need convert it string data. how can i do this?

Laksen:
What does \001

If it means 1 then you can't get it as ascii, since it's not a renderable character

ahmetnurideniz:

--- Quote from: Laksen on August 26, 2010, 04:05:49 pm ---What does \001

If it means 1 then you can't get it as ascii, since it's not a renderable character

--- End quote ---
i see this text when i look wireshark(Packet Sniffer)  "\001\r\n\". wireshark can convert it binary to string and i can see it.

i know data is binnary i need to convert it string.
how i can do this?

Laksen:
IntToHex?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version