Click here to Skip to main content
15,896,730 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Everyone..
I am trying to create XML file in VB.Net 2008, but While creating the file I am supposed to get the Output as:

XML
<?xml version="1.0" encoding="UTF-8"?>


but this is what I get

XML
<?xml version="1.0" encoding="utf-8"?>


I want "utf-8" in Uppercase.. Tried many codes, but dissatisfied..

Any help would be appreciated.

Thanks in Advance.

What I have tried:

Right Now I Have written:

Dim FileName as String
FileName = Application.StartupPath & "\TESTING.XML"
Dim Writer As New XmlTextWriter(FileName, System.Text.Encoding.UTF8)

Everything is working perfectly, other than lower case "utf-8".
Posted
Updated 20-Jun-19 1:32am
Comments
Maciej Los 20-Jun-19 8:08am    
Trully, i don't understand such of requirements...
Ankush_Sethiya 20-Jun-19 9:48am    
XML file generated with lowercase "utf-8" was not getting uploaded in one of the tool. The difference between the file which was getting uploaded in that tool was only "UTF-8". Hence, we posted this requirement. After getting this file with Uppercase "UTF-8", its getting uploaded in that tool..!

1 solution

It's not supposed to matter at all, and I only know of one app that doesn't like lowercase - which most systems generate.

But ... it's not that difficult to do: c# - utf-8 in uppercase? - Stack Overflow[^] - the code is C#, but it should be pretty simple to convert. Ifg you need it, online converters exist: Code Converter C# to VB and VB to C# – Telerik[^] which may do most of it for you.
 
Share this answer
 
Comments
Maciej Los 20-Jun-19 8:07am    
5ed!
Ankush_Sethiya 20-Jun-19 9:42am    
Thanks @OriginalGriff..!! :)
It worked Fine..!!
OriginalGriff 20-Jun-19 9:57am    
You're welcome!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900