We have implmented a REST-style get service Using WCF in .Net 3.5. This service retrieves research documents. The string 'synopsis' indicated in the code bolow contains non-english characteres which the browser deliveres as "????????".
private void ReturnSynopsisInfo(IApiWebOperationContext context, OutgoingWebResponseContext outgoingResp, string synopsis) { SetResponseHeaders(outgoingResp, HttpStatusCode.OK); outgoingResp.ContentType = "text/html; charset=UTF-8"; context.Result = new MemoryStream(Encoding.ASCII.GetBytes(synopsis)); }
Any advise is much appreciated.
Thank You.