Sharepoint Forum

 
Home » Forum » Sharepoint       Ask a questionRSS Feeds

Unwanted question marks after ASCII encoding of SPFILE

  Asked By: Patrick Gonzalez         Date: Apr 27, 2010      Category: Sharepoint      Views: 274

I have the code as follows:


string DocUrl = "http://localhost/NDA/Amendment/A0001.xml";
SPWeb NdaWeb = "";
SPFile NdaFile = NdaWeb.GetFile(DocUrl);
Byte[] data = NdaFile.OpenBinary();
String AmendmentXml = string.Empty;
System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding();
AmendmentXml = enc.GetString(data);


After running the above code, the string "AmendmentXml" contains the
question manrks "?" for the text where more than one space exists.

It also inserts three question marks('???') in the begining of the file.

How to avoid these unwanted question marks?


Do you know someone who can help? Share a link to this thread on twitter, or facebook.

Tagged:                

 

No Answers Found. Be the First, To Post Answer.

 
Didn't find what you were looking for? Find more on Unwanted question marks after ASCII encoding of SPFILE Or get search suggestion and latest updates.


Your Answer
  • Answer should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].