none
Unwanted question marks after ASCII encoding of SPFILE

    Question

  • Hi,

    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,

    Yasovardhan.

    Thursday, July 03, 2008 9:48 AM

All replies