![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
#3
| |||
| |||
|
|
I have seen that empty rectangle before- seems like default behaviour -why I have no idea. There is a parameter "encoderShouldEmitUTF8Identifier" (type Boolean) as one of the options on the constructor of the System.Text.UTF8Encoding So add these 2 lines -------------------------------------------------------- System.text.UTF8Encoding enc; enc = New System.text.UTF8Encoding(False); -------------------------------------------------------- And change your code to this -------------------------------------------------------- MemoryStream ms = new MemoryStream(); XmlTextWriter xw = new XmlTextWriter(ms,enc); -------------------------------------------------------- Dickster |
#4
| |||
| |||
|
|
The short answer to the earlier post is, 'Don't use a MemoryStream object with an XmlWriter.' The expected results are received in my case when an HttpContext.Response.OutputStream is used instead. -- Bryan, Emperor of String.Empty http://songhaysystem.com "dickster" wrote: I have seen that empty rectangle before- seems like default behaviour -why I have no idea. There is a parameter "encoderShouldEmitUTF8Identifier" (type Boolean) as one of the options on the constructor of the System.Text.UTF8Encoding So add these 2 lines -------------------------------------------------------- System.text.UTF8Encoding enc; enc = New System.text.UTF8Encoding(False); -------------------------------------------------------- And change your code to this -------------------------------------------------------- MemoryStream ms = new MemoryStream(); XmlTextWriter xw = new XmlTextWriter(ms,enc); -------------------------------------------------------- Dickster |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |