Re: Entire string lost when removing null characters

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



tcomer wrote:
[...]
.... which is ridiculous in the first place. But at line 4, the
contents of results is nothing except "\\\\\\\\\\\\\\\\\\...etc".
II've tried using Replace, Split, Remove.. none of it works. Any hints
as to why the operations fail?

I don't know. Seems like Replace would do what you seem to be trying to do (though why the backlash is a suitable replacement for a null character, I'm not sure).

But, why is it ridiculous for there to be null characters in the data? Do you have any reason to believe that this application protocol is string-only? The data you posted contains things that, at least to me, look like it may be intended to be interpreted as a struct of some sort, with character arrays embedded. Perhaps a more appropriate solution would be to interpret it that way instead.

Is there some documentation for this protocol that you can share, that would provide some insight into the larger issue you're dealing with?

Pete
.



Relevant Pages

  • Re: how to read AIS data from encapsulated NMEA VDO sentence
    ... The data is actually send as a bitstream and the protocol for every ... perhaps 16 bit bytes) as a character. ... one character in the string given above. ... capture buffer to read each character out in ascii values, ...
    (rec.boats.electronics)
  • Re: HTML entities not rendered when appended to SELECT
    ... character from a character set of the runtime environment's native 8-bit ... Can you show the time and implementation where it didn't interpret ... You are ofcourse free to doubt the implementations of string literals ... If the implementation didn't support unicode, ...
    (comp.lang.javascript)
  • Re: Serial (rs232 etc.) to IP
    ... >> corresponds to 100-1000 character times. ... >character packets when many common embedded TCP devices try to talk to ... If you are using a protocol that was initially written for serial line ...
    (comp.arch.embedded)
  • Re: HTML entities not rendered when appended to SELECT
    ... I would only trust it from \x00 to \x7F. ... implementation that would interpret other escape sequences as a character ... from a locale- dependent encoding using 8-bit code units as it has been ... but the ISO-8859-6 character at the same code point ...
    (comp.lang.javascript)
  • Re: iswspace and iswprint
    ... "Each of the following functions returns true for each wide character ... may differ with respect to wide characters other than L' ' that are both ... The bottom line is I interpret this as meaning: ... VC++ .NET returning 1 is not compliant with the ISO standard. ...
    (comp.lang.c)