Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Invalid character using XMLTextWriter

Status
Not open for further replies.

DerPflug

Programmer
Mar 28, 2002
153
US
I'm downloading a text file from the web and immediately turning it into an xml document using an xmltextwriter. From there it is sent to a stored procedure where the file info is loaded into an SQL Server table. However, in order to test my XML document creation I am writing the XML document to a folder rather than passing it immediately to a stored procedure. In looking at the file I noticed that the characters "�" are randomly placed throughout the document, causing the info contained therein to be misformatted. I am using utf-8 encoding. I have seen references on the web that this is a null. How do I get rid of this mysterious character?

Any help would be appreciated.
 
The answer was easy:

strLine = replace(strLine, chr(0),"")
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top