S
SDS
Greets,
I am reading some binary data and putting into a System.String object
via Encoding.Default.GetString(). I then take this string and put it
into a dataset field of type System.String.
I then create a XmlWriter with UTF-8 encoding in it's settings and
attempt to save the dataset to disk via .WriteXml.
The binary data is unreliable in the sense that I can expect to receive
illegal characters according to the XmlWriter. For example, I receive
this exception:
System.ArgumentException: '', hexadecimal value 0x0E, is an invalid
character.
These illegal characters I am not intersted in preserving (but I am
intersted in anything and everything legal according to UTF-8), so
ideally I'm looking for a quick and easy way to strip out anything that
is going to cause me problems.
What is the best approach here?
TIA!
I am reading some binary data and putting into a System.String object
via Encoding.Default.GetString(). I then take this string and put it
into a dataset field of type System.String.
I then create a XmlWriter with UTF-8 encoding in it's settings and
attempt to save the dataset to disk via .WriteXml.
The binary data is unreliable in the sense that I can expect to receive
illegal characters according to the XmlWriter. For example, I receive
this exception:
System.ArgumentException: '', hexadecimal value 0x0E, is an invalid
character.
These illegal characters I am not intersted in preserving (but I am
intersted in anything and everything legal according to UTF-8), so
ideally I'm looking for a quick and easy way to strip out anything that
is going to cause me problems.
What is the best approach here?
TIA!