ywuwgij / elmah

Automatically exported from code.google.com/p/elmah
Apache License 2.0
0 stars 0 forks source link

AllXml column value with encoding NTEXT as XML UTF-16 cannot be opened with web browser #90

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago

------------------------------
What steps will reproduce the problem?

1. Go to SQL Management Studio or similar database tool.

2. Open the ELMAH_Error table.

3. Copy a value from the AllXml column for a given row.

4. Save as "SomeFile.xml".

5. Try to open the file in IE7 or similar and an error appears 
saying "Switch from current encoding to specified encoding not supported. 
Error processing resource".

7. Try to open teh file in VS.NET 2008 Standard or similar and the file is 
opened but it is blank.

------------------------------
What is the expected output? 

I expect to be able to save the value into a plain-text file, save the 
file with an extension of ".xml", open it in a browser or in the VS.NET 
IDE, and see the file contents.

------------------------------
What do you see instead?

The file is empty in VS.NET and the file loads with an error (as noted 
above) in IE.

------------------------------
What version of the product are you using? 

Downloaded recently, "1.0.10617.936".

------------------------------
On what operating system?

Windows XP Pro, fully patched.

------------------------------
Please provide any additional information below.

Using VS.NET 2008 Standard, fully patched, Framework 3.5, ASP.NET, C#.NET

My suggestion is to use a default to "utf-8" instead because that is more 
typical (it seems to me) and add a config key that allows ones to set it 
to something else.

Original issue reported on code.google.com by mkamo...@gmail.com on 29 Apr 2009 at 7:52

GoogleCodeExporter commented 8 years ago
> 4. Save as "SomeFile.xml".

You might be going wrong at this step. When you paste into, for example, 
Notepad,
make sure you set the file's encoding to Unicode when saving it. See the 
attached
screen shot for where to find this option on the Save/Save As dialog box. With 
this
set correctly, the file will open fine in IE and VS.

Original comment by azizatif on 2 May 2009 at 6:24

Attachments: