Thursday, July 03, 2008 9:48 AMHi,
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?
Thanks in advance,
Tuesday, July 08, 2008 4:41 AM
ASCII encoding can result in loss of data since it only account for 128 characters with ambiguous 8th bit. Your application should use UTF8Encoding, UTF32Encoding, or UnicodeEncoding.
Tuesday, July 08, 2008 8:54 AMI tried using other encoding(UTF8Encoding, UTF32Encoding, UnicodeEncoding). But still I am gettting the question marks. Is there any other solution?