Re: Entire string lost when removing null characters
- From: Peter Duniho <NpOeStPeAdM@xxxxxxxxxxxxxxxx>
- Date: Thu, 25 Oct 2007 17:19:52 -0700
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
.
- References:
- Entire string lost when removing null characters
- From: tcomer
- Entire string lost when removing null characters
- Prev by Date: Re: DataGridView.SelectedCells returning the Cell/Index in the Unsorted Datatable
- Next by Date: Re: Using C# Interfaces and User Controls
- Previous by thread: Entire string lost when removing null characters
- Next by thread: Re: Entire string lost when removing null characters
- Index(es):
Relevant Pages
|